From patchwork Thu Feb 15 22:07:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 201804 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp156230dyb; Thu, 15 Feb 2024 14:21:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCViNd0JRcF/81Q5arpZ7ZYxsI4wVBgqs5gyV/e/2EA/1uXRaml6bwS3ngBQILbv8F6en9vk2ZB2GSjbpvfKGHNiBjlmiQ== X-Google-Smtp-Source: AGHT+IHMXYNvQXeZquudu+Ray77eeIIQUEY8eQyepZclY9p4BHXiLOvNsxErSnGqHqCFNonj0TOt X-Received: by 2002:a17:906:3c18:b0:a3c:ea61:9359 with SMTP id h24-20020a1709063c1800b00a3cea619359mr1939008ejg.77.1708035690830; Thu, 15 Feb 2024 14:21:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708035690; cv=pass; d=google.com; s=arc-20160816; b=qgE98VLzk978K6P6BfI/RhzVUOYyI5KxNpmSxM2kRrKW0ivg86SUavXq/RN0Aac1NW 6KDrat+zbB52oDRqOd2QNFDEaNfbld3bjzAMSJmb8m8IAxWWe9zOX/eB9pBDTRzM2Q5z BS8BtWwMFnwlLC4eVR6sCoUHTlUfzeY1WFIjCkhuOyJNYsH7yTssgxWlPwwKgF8G7lsS R675hhei2+GivQ1Kg2Ludi60Z5Obn09fmyLBP+4RldJKSkcu9IIYYw5sYCH05aiwxaeI /sSrA887HbA9ZiKMZlE6xGBGWdfGmE7D/N3pRdMst2S4UttTC7GZ4izAOXCcuqO/4hDV bfDg== 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=RLpioKRBvBvjG6X7CZTJJIG/dvzFzjHsdAqj+Tw9e24=; fh=Usz7XAB1EI7Q/DdLEXd449E1MLGpSzqdCCNe5XKh9R0=; b=lZVzTZLfNFnK41Do8Bf9MX9pyqxo7MWXEUZ0lc6LRDVcoGK8/bp00tXiQgdBSZb80X S/vun4MIn7pdKAXIV75Kq9Ne8NMyMAh5IWRbL2ppIQOKaOkYgOicHoyutqXIhsSdawFn 9U3CNzHEacUK5GsxeOompZ6iuQTF9IzS5Cg5ASBezt9tYSPFmP+9ZS3/hp/VVWzg6YgN wScRliiEtg0FoVzhAiGJbrl/E75xGZAHGX4HRAnCIbNfhpl+eCnsXiwgdrVCVBR1jK5T GdVyLZNC6XvLDGGuV7P7L6a4UbUGz30wcDgu96E9YX2gfKULvWX2vJh7N5dEe9I2I6P2 Vn0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=jXiMnlOB; 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-67746-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67746-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n18-20020a170906119200b00a3d2dedf4c2si984237eja.1025.2024.02.15.14.21.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67746-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=jXiMnlOB; 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-67746-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67746-ouuuleilei=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 DA91C1F2695D for ; Thu, 15 Feb 2024 22:13:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F01614D43B; Thu, 15 Feb 2024 22:08:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="jXiMnlOB" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 45114145B3C; Thu, 15 Feb 2024 22:08:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034908; cv=none; b=FUgtO+IWHn0IInwvxMyCnGVLzryjAYS3ysWcQtYXnbgIs9+7NSIhSdXhhu24KVZ3cHbGOYe+Y0P5CjMIgK9Eljf7RpqhjPylSHrGQEigg+VrciLAgfX+6wja0m6aJKy8urHuWosptmi4UeDibjkLSiF0OKZy97+Y7d6QhVW1prM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034908; c=relaxed/simple; bh=gT16x+suHzi4RJDxnpVIxo63PiknxpyG8sAgpETh/No=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q9+XmTydA0TVu/XtQxPZ19VA7Me+o2ObeA/jghKYULN2oQcUyNRPpaSM6o5yZITMRVOJfsuVeLy1v0G2UOnSszgZW1+UM3oWwtY5vFN38ZwG5CO6S4cA6oiUXQ9GiCWgx3ND/Yso1i0+oV4i1h3tTM7rK9KNT9/RHEAa/zKYAKc= 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=jXiMnlOB; arc=none smtp.client-ip=148.163.158.5 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 (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FJh3mm029685; Thu, 15 Feb 2024 22:08:09 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=RLpioKRBvBvjG6X7CZTJJIG/dvzFzjHsdAqj+Tw9e24=; b=jXiMnlOBP8y7xMfyHt6V1kMrCnT2m8JB1EqvSshyCojTBOvi1VlHPqmJPYKe4JkftPh+ 3CUCb5w+AUbolVIp6iJbGEUmnPw5L4LCZT2Mm2wuBLjZ26Euc1eEwdcu9orgNzMoimDR xbHgQORuqVMR1Og3tl1CrV+0GqRBg/mbcBszwuqqpauKIS3URHGrjOh+oBA951R13rD0 2fcy4lKSESVNsbbB8zAehV6aEk+Oe14S/VMtonvFHK0zp4LIYBuHQBrmMeK2giD0CAn+ GFMeSk7aQjHO5axlKTH6nE4KiT9RWvcg9vRDpVk4s366HYC37AMJqkttZdgnG3f8wdWs rQ== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w9s0tjy3p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:09 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41FM7dYg032572; Thu, 15 Feb 2024 22:08:08 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w6kftyudn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:08 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41FM85YW22676140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 22:08:07 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB9F358063; Thu, 15 Feb 2024 22:08:03 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 705F358077; Thu, 15 Feb 2024 22:08:03 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.14.18]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Feb 2024 22:08:03 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, andi.shyti@kernel.org, eajames@linux.ibm.com, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, sboyd@kernel.org, mturquette@baylibre.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Subject: [PATCH 05/33] fsi: Use a defined value for default echo delay Date: Thu, 15 Feb 2024 16:07:31 -0600 Message-Id: <20240215220759.976998-6-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215220759.976998-1-eajames@linux.ibm.com> References: <20240215220759.976998-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 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: DJBdCuUicqlEPNo5M5sYjpvGPU4Xxox9 X-Proofpoint-ORIG-GUID: DJBdCuUicqlEPNo5M5sYjpvGPU4Xxox9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_20,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 clxscore=1015 suspectscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150171 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791005232512912745 X-GMAIL-MSGID: 1791005232512912745 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 1c687eb021a0..8823e8e56dab 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 dba65bd4e083..dca9db0a42e5 100644 --- a/drivers/fsi/fsi-slave.h +++ b/drivers/fsi/fsi-slave.h @@ -41,8 +41,10 @@ #define FSI_SMODE_SID_MASK 3 /* ID Mask */ #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 */