Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp471961lqo; Thu, 16 May 2024 11:20:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4sUMfxWAHD75j+54YB9B0IDmNGUKtB7UgNI1eVurahpslzYgTFGn5sIhxk1yxuwUa1HVs8RqMBtiKpww8XWrsW6ohBwNEzLNfvFeetA== X-Google-Smtp-Source: AGHT+IGphyZY1zVc5rjuhKqdia+m6s6hGK4JtcUsYm9EvKs4oYMd9Yz+fo0A80kOIO4/5QKWd2pZ X-Received: by 2002:a17:907:38c:b0:a59:d39a:8d66 with SMTP id a640c23a62f3a-a5a2d5cb81emr1352175966b.38.1715883605808; Thu, 16 May 2024 11:20:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715883605; cv=pass; d=google.com; s=arc-20160816; b=ePnTMIIb7j76ceEglbURaNkujxWKMOHMI/u4Wg+C32Lh9xxHBRcgHILZV25360Zesm qfmyFsYN6fH/VN/uC8rAXAn8hdDFJxdjzxJkBXv/rT/w0JWZ7iqwtv1ldgThh7PcR6D5 k+p/Yx6jfp6vxgSKeq81X7zduyMZB04LWX606/0bQKrae74j7K9GOyR4W0eekB7XCfFZ lVkr3KtEKyYtVN9P6qbhvsvzKS1iE3hU8DoI7OW1Ur1lwsf3PAGzYpHYDmu2RHU7+/fk u5Gk8zy8weA0DUgskn6FCjKbxapbirFgN7ticcJ45SWa+ns6ZEpjrpS9i/iFoWKPcPsP cZYA== 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=r7jucx4EDwcx4QmKdJY/B/BWs7eG+xdxvoZ3FO/I2uA=; b=s/pgPzm+MJ7i1vGYZ3aHm2liAxrM+7HuAM54KsSHQdRq65kxrScEwrG/h34yeDMyyG zPkxBanDo57PreSSYEktaPW/HsCRLWa+Rec3GsyMrPDteWQqLX3oTSdo/F5Fg0m8OQ7q jieI83eZz/7pQfAJZ+MSCuqfps79a1cF4+2//vrHJvTmNTFkXyJUXC4AJ1O7GF/yNlym h7RfjDOtZ37kSzBX+tSlNNNR4ILc5+qCvi+QYFDR7yvnrqwQyzyBm42fJeJsSzdfFLNx wzsMWwP06Bsp0bn7x6YZiGpgpajKTn6/T3m8rDrtI/qzxGtn4kDE2chbqvb/bYmnSV7Q My1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mOiO6qze; 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-181433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba6b82si887473066b.678.2024.05.16.11.20.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:20:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mOiO6qze; 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-181433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181433-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 89F1F1F218A0 for ; Thu, 16 May 2024 18:20:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65777157486; Thu, 16 May 2024 18:19:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="mOiO6qze" 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 9BD40156C5E; Thu, 16 May 2024 18:19:28 +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=1715883571; cv=none; b=ljeIfTC1ejwnMBj18WurIV6fr5HxE3SpGDFq0QROzBEm0+aW6A7Ek+g1T7IJBpVSoO97t0aH1rp110gUkJgMX4TIq8vnIrdotqsqACnNBw2RHjPOe8zFhhjOZYwA2/SOViOAo6Hd6d0NPAzLdOsG5Nmh199UVxjsbRP6WBcb5rc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715883571; c=relaxed/simple; bh=c6X5cBeVcHCy2khqupbb2XqaXAyq1jU0VNJD2arVWzs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TmCr5U25aIh2S9HRvDaT1nmRc7dWIFht8UaNDcRR6uiB8RribXGqJokX6P7MWPYWh4MLW+mIUWhbBnDgUIOaXfCPWGXd9rGrs9zjBxHCBM80wqz2AhmQK7FVpXwcuN3rCEiSBeGaFR6KqYVhmEZ31oNNWcL85ggPHrg5B0Wk8SU= 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=mOiO6qze; 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 44GIAW5O020133; Thu, 16 May 2024 18:19:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=c52WiDs0KUXzepuhSz5qr9KqOUKGpDG3JkjIGvE1bYo=; b=mOiO6qze8ViIey1TofP9PLm/uW6joTcjzj8b2R5ROLYJX/AH2Uzv4sDZTEk1Ern91I99 ysq8gS/h8eORjIr1Tu5kIyLcgft8dWsJRkg2meBHb4XnORx+sQ5GaRBzsDvyWCnfECLn QC30hY39RgS6BtykwIuekBBASaLRJjiRpaBUAsfl1HEEM46oA4pA7k5Cg/vy21JXb1wn 6YGsWMPf2iHFcVeSqhlDhNi6E0FNcRgtHbUiNzDW5mK4BDXJSpTPLsxvMM0S9kjW4o8I 0oSoaI29qWmUJiwud3kJ7UeaTJGabjgNhnPNXku8wgM9oS9PomK6Rzv1971qk81r0hbw 7Q== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y5p6gg5my-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 18:19:13 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44GG5g8M029591; Thu, 16 May 2024 18:19:12 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3y2n7m34m1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 18:19:12 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44GIJA5T12649170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 May 2024 18:19:12 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C85F958071; Thu, 16 May 2024 18:19:08 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 889AA5806D; Thu, 16 May 2024 18:19:08 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.107.19]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 16 May 2024 18:19:08 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: 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, eajames@linux.ibm.com Subject: [PATCH v3 04/40] fsi: Use a defined value for default echo delay Date: Thu, 16 May 2024 13:18:31 -0500 Message-Id: <20240516181907.3468796-5-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240516181907.3468796-1-eajames@linux.ibm.com> References: <20240516181907.3468796-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: qYdum3aqYtzRi4afjttFASsNwG_Y8jsn X-Proofpoint-ORIG-GUID: qYdum3aqYtzRi4afjttFASsNwG_Y8jsn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405160132 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