Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp741873rdb; Thu, 15 Feb 2024 14:11:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWm4zPEwCFNzWOQaCnaVY7ivC7pNUu8fiE8+0gkhpUEhVcGsiCrr6S5UxPqyFkxzKtcuH2Ehx9J/UzKHpTZ8gfnyRzYvdVZHiszfH57yw== X-Google-Smtp-Source: AGHT+IHO2ST3B7fy/Be5SQ8N3Bgw5zK7hIV5lJPtuc9OkM48Mj1FqkCZcMSjMwoUKjzA/in1yAYP X-Received: by 2002:a17:906:4958:b0:a3d:3895:1702 with SMTP id f24-20020a170906495800b00a3d38951702mr2196939ejt.5.1708035064279; Thu, 15 Feb 2024 14:11:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708035064; cv=pass; d=google.com; s=arc-20160816; b=bFnvFJX2of3cyqskdN15DeVi95XECi6qCRFxo4Vb6yBZNo8RovZidUYFjChaMtu8nd 6pIonLOoKzaJhcLm1l9dqdDh8ENLRGgaMkMbcXH4egelBSxZeI/fwSo3RuBzSrklNFwR fmitJICOc6+fQ5GTJ32BPTgxkWgfGc5OiyV2mil75JALip+rTyUar94ORrwReh31Rmzh gwVdMlmU9ZvAWqAEldKZNaW9NoL9zqkJhjC8NEwRxkYuppW9Cjd+DFba8aTaowwJ2kHU 6peGOTIKc63Q7W2KCDhCe9wuGB45LVH97iInxvqVaAnApsMPJdF29rvaLN3oNTZkqUfh dMfw== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67746-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. [147.75.80.249]) by mx.google.com with ESMTPS id lo27-20020a170906fa1b00b00a3ce9a2aec9si999723ejb.520.2024.02.15.14.11.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:11:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67746-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67746-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 DA7E01F23C58 for ; Thu, 15 Feb 2024 22:11:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC053148FE3; Thu, 15 Feb 2024 22:08:29 +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 Content-Transfer-Encoding: 8bit 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 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 */ -- 2.39.3