Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp568458lqr; Wed, 5 Jun 2024 14:24:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrG431W18ekTZI4P/ZIzZ9l8uEAGdjIA0NlyYKcXtNQHs04h6OXSTB+1n6QGHbgFR5rHijDc/s5me6Eje7o1p+I4c+Db6WAk2K5qXNzA== X-Google-Smtp-Source: AGHT+IGO9na/1Q2OUm3+LTirEla+TbQDMyGVzbB0z8wuECKXgNAga2dTJMuxhwU7ia8neQyhIUV/ X-Received: by 2002:a05:6a00:4293:b0:6f6:7bd1:d032 with SMTP id d2e1a72fcca58-703e5929602mr4313905b3a.7.1717622645728; Wed, 05 Jun 2024 14:24:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717622645; cv=pass; d=google.com; s=arc-20160816; b=AEcdBgTVmR4X1YOKO6tMdyrAMkI337cFhaqH/+iq6znsmB7CNqXzDGTv6LIJKURd4v bT0mXkKWQGiuz0X1Xg4zvNk9yQHg0tFCEpYYmSEwa4DXqo3oAoBJlEi1scA+/+hvER+T fDjkObqRFGmjl0cGGaRWcFT3E0YSArkV+BALnHHZ/hgcepbJGzrOvEGFafu6bW/gShPV hrrB1B9uk1Oxw1JqMPOQNvUue84HWjR93i/QeQVSaVgmPq7QnldahpmxwCFqcEA0mOHv RNpwjezqON0z8eGyYa946m83gHaRywnC5eNEIh3P8T7Pl4DGFKiOuiOPFK3lvls0uLZY B7iA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=c52WiDs0KUXzepuhSz5qr9KqOUKGpDG3JkjIGvE1bYo=; fh=F5i+rNW4hjf57QJHDx14Nq4Eso4Z4OyY/LhC2i40VT4=; b=BABSGaYMzkMyfzWC2fyBog3L+aHJi8kH520i8td5GucrA+mI+iyy4DJTShdsUp4YU8 OnjsNxAYTPwM1PxyV5dU+4uJc9uqbNGh0gfyzCV3y1NlmejPlzGTb0mA0kVWidOGMmNK n3cIHkjyOClXbTxYIbi1wZAzVFxfBE8P7BLWiR9fT2xffCWgzeJYr0DP578MSzXY2FJy NMWtvEzO6Fu0L0Ei2PkYyOsoxpsgEhzpMF8nzdljcOTcR2HYzyr7H4qEkIn6tKRQaSzU 4QgNNZaz7VuSuItwqcO/9kDf6+YqY1o7d1Ky3qqLKX9iEJ8BC9j40mArQBtQo1vtC5x/ WHBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=oKOhFWtH; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-203251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70258a02025si8446331b3a.40.2024.06.05.14.24.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 14:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=oKOhFWtH; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-203251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EB9CA283D07 for ; Wed, 5 Jun 2024 21:23:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B35815FA7A; Wed, 5 Jun 2024 21:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="oKOhFWtH" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BE5012E63; Wed, 5 Jun 2024 21:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717622616; cv=none; b=jDiwpO61te53tQClmgJeYkSuRXmur9Okpp9ZwgRJCLkyPuJbJ76uffH3d84L1ShDCd6hj6goVIXdvQrc9ufzkXt4Z49dQGcUldPJdqkE2Pu+z1LQVvRVu9UK4PGY/h+mv3k/byWj3lNOEWE+uiQXDV0q5GVDNThUeVray3wjk7s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717622616; c=relaxed/simple; bh=c6X5cBeVcHCy2khqupbb2XqaXAyq1jU0VNJD2arVWzs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XaFO1cEUNgKJ1V6eFPfBkkGIVPDw55IDP27haaLTxMQQtcl7jYnblDKZv9am6a20T2DSLuGjqPsaFv8eKItjCUTDqAJb2fUXN7w/PbhlpRgfQ/VT5gCQT6CXNpwxvze/p5s+n3SIWFkteyO+LFHmSIzqSMsly4GqfNUkr17Ujao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=oKOhFWtH; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 455LBh1p011765; Wed, 5 Jun 2024 21:23:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc : content-transfer-encoding : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pp1; bh=c52WiDs0KUXzepuhSz5qr9KqOUKGpDG3JkjIGvE1bYo=; b=oKOhFWtHKvw6MSyp/9rHmBc0XnItfj8TU5sdvxNqtGaNAQRj3576bYwaNS8r980FL85s 3BD157qf8RAQZGxT9z+7iv+2VpbsIwhQ5HBCzUGLpcDIIOKinrIxRo/vXh9aqmAaHQE1 pwSIIJ0qHCaKUTqMqkb7u/n727FYLeWIWSfDNZg5GwyKUAsDDo4f99mVFAhz/oeHzWjj fTD/yxw/asDGcungrNbcGicG6rKQqMcFQOq/WZjymBk9s6rCwS4eyV+UKS/+Y+mgUjkc QYdy0yv2kO6f9kXeJLdfnQwszyLQo7Ptm1kmFYKFKrA154i/HkuPuCbfuqxKFW/uCya1 JA== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjyqf00rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 21:23:19 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 455JVcN9031129; Wed, 5 Jun 2024 21:23:18 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([172.16.1.74]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ygeyppnsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 21:23:18 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 455LNEWG7733802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Jun 2024 21:23:17 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B7F9B58060; Wed, 5 Jun 2024 21:23:14 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 45BFD58059; Wed, 5 Jun 2024 21:23:14 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.121.242]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 5 Jun 2024 21:23:14 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: eajames@linux.ibm.com, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, broonie@kernel.org, andi.shyti@kernel.org, joel@jms.id.au, alistair@popple.id.au, jk@ozlabs.org, andrew@codeconstruct.com.au, linux-aspeed@lists.ozlabs.org, ninad@linux.ibm.com, lakshmiy@us.ibm.com Subject: [PATCH v4 04/40] fsi: Use a defined value for default echo delay Date: Wed, 5 Jun 2024 16:22:36 -0500 Message-Id: <20240605212312.349188-5-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240605212312.349188-1-eajames@linux.ibm.com> References: <20240605212312.349188-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: rpB8W7vUEWK5uwd-GLpsqm9PfjL9BVOj X-Proofpoint-ORIG-GUID: rpB8W7vUEWK5uwd-GLpsqm9PfjL9BVOj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-05_02,2024-06-05_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 clxscore=1015 mlxscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406050160 Avoid hardcoding '16' several times. Signed-off-by: Eddie James --- drivers/fsi/fsi-core.c | 6 +++--- drivers/fsi/fsi-slave.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index e8dbf5e95c234..27235583183e5 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -1008,8 +1008,8 @@ static int fsi_slave_init(struct fsi_master *master, int link, uint8_t id) slave->link = link; slave->id = id; slave->size = FSI_SLAVE_SIZE_23b; - slave->t_send_delay = 16; - slave->t_echo_delay = 16; + slave->t_send_delay = FSI_SMODE_SD_DEFAULT; + slave->t_echo_delay = FSI_SMODE_ED_DEFAULT; /* Get chip ID if any */ slave->chip_id = -1; @@ -1160,7 +1160,7 @@ static int fsi_master_break(struct fsi_master *master, int link) if (master->send_break) rc = master->send_break(master, link); if (master->link_config) - master->link_config(master, link, 16, 16); + master->link_config(master, link, FSI_SMODE_SD_DEFAULT, FSI_SMODE_ED_DEFAULT); return rc; } diff --git a/drivers/fsi/fsi-slave.h b/drivers/fsi/fsi-slave.h index f6cca04131a92..45190b06fa027 100644 --- a/drivers/fsi/fsi-slave.h +++ b/drivers/fsi/fsi-slave.h @@ -42,8 +42,10 @@ #define FSI_SMODE_SID_BREAK 3 /* ID after break command */ #define FSI_SMODE_ED_SHIFT 20 /* Echo delay shift */ #define FSI_SMODE_ED_MASK 0xf /* Echo delay mask */ +#define FSI_SMODE_ED_DEFAULT 16 /* Default echo delay */ #define FSI_SMODE_SD_SHIFT 16 /* Send delay shift */ #define FSI_SMODE_SD_MASK 0xf /* Send delay mask */ +#define FSI_SMODE_SD_DEFAULT 16 /* Default send delay */ #define FSI_SMODE_LBCRR_SHIFT 8 /* Clk ratio shift */ #define FSI_SMODE_LBCRR_MASK 0xf /* Clk ratio mask */ -- 2.39.3