Message ID | 20240131215044.3163469-5-jm@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47203-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp49314dyc; Wed, 31 Jan 2024 14:01:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpKCNFcygKvaCxk0LwVPIkE7ATyildLopG9do1VeTndx4Hlmh/X3Iot519Uhaw+qEv3kzo X-Received: by 2002:a05:6a20:8012:b0:19e:3006:5dc5 with SMTP id e18-20020a056a20801200b0019e30065dc5mr2647972pza.3.1706738488122; Wed, 31 Jan 2024 14:01:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706738488; cv=pass; d=google.com; s=arc-20160816; b=RigVd5GHAaXxB6rQNiG/UBXlT81uB/yRezMddMd5GZ2W97lNDI3F9bnDB2KCkxGUg1 ua/KyMnmVn34w6A1Q1IhuJzb9i81R+lYko9Y53ZH94SYYDbSg61Qk1M55GkVf92cUxDj dIA3Bvc213gI9KsCDww5gN8XUCtfcupT2M1V5v9+go457NjX0dW/mmNYz5N7UfPE2j4P MeNj1XbaOs8QVbpcMcob40rE2SsxZ5JErR/bDvpbpzKcfsNaND8CEFVcNRgrFhyEbvMF orxp6zCzTphl4iTFJrie5ylw3yU8f5CxMyqflbsXdPqAwHsXfdo9yLGZSDi0gJ7i1g4B ZMpg== 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=onc9QM9ukgmYukraFs8da86DAT/6E9TriZDUxBTiRZ8=; fh=5kIJk6lw+Iemcq3DaGU9VkDDGXLTlYcaecI6kTuMnBk=; b=l/pl4ZPKTW1Nz/Aclkci1yD8rOJBGRaxd/NDHZ9b08OIJVDalvQHPf3S02UU4uJHcr zCOAkKNB+SyT0+5D25E5iKGqLTjJ7w33LHBkm9N7G0rMn43i71fTFF84l3uawlR32MpF ocv4SnfgjmgYFMOAUa/ekWrLWfCQf/u4aczd0A8HzTFmmKb1yuT/M3CTrvsjF9GVftTK EH7fg9+QwX+DRW6+BXBliS7QMxuy291xHoiyZPRQWSBfXPMU+PchawPWelsmGCnjVh5d ytgZTwWweNu8/KwFsKqyr+FsSKNYn3juks9KKcxcknCJDEk9Q5AIALhH3AvLmgX2LA8D tDKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h6ZidhzT; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-47203-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47203-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=1; AJvYcCXYkNUHDsK9lGJducc2k/K8dxECcxC/GWMmikWUPm81ashUKj8eLR9uzSRAizs8JtriSYPd64RKAbYfuLqa3ZDziPfR1Q== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i13-20020a056a00004d00b006d45aab6faasi10420561pfk.40.2024.01.31.14.01.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:01:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47203-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h6ZidhzT; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-47203-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47203-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 528DEB216FE for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 21:54:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CFEE3FB29; Wed, 31 Jan 2024 21:50:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="h6ZidhzT" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 685353BB24; Wed, 31 Jan 2024 21:50:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737849; cv=none; b=qwUTYZ2bTiQ5cGmMQAs01E8ge0pB39xHsJE4LmQWe5O7D5/dZdNXxR8quanfHcdMTr+l5+L+x5iyXCSswQ3oDpPLduJYbRYd8mjfkEbvBvYhvrq66PGW9oO1V3vQWfBnhBzDzzwC9OIRNrKYYoMD1Aomrp/kWOvwoWMwdWymaSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737849; c=relaxed/simple; bh=IVwl22V66+iZHjkuJII1kYOWnJyoRAFMYxv9KsU1hW8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u7h03EYPruh5/9fLP/UYw/WftNPTDH4kybKO40ais17eZ3a5WCfhVmei1CKBlFFcqhp02jhUoe8pSpd1XH6KdsxezhYTbcS6/oJlf8ypRbf5miADLB6iW+epCLtR94UiUxHa1sEC4vCwA+8I21eYgxvDQm3SGSM8SKnEWG1VC8Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=h6ZidhzT; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VLoj6Q123748; Wed, 31 Jan 2024 15:50:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706737845; bh=onc9QM9ukgmYukraFs8da86DAT/6E9TriZDUxBTiRZ8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=h6ZidhzToGBvckW3AtE7TWzfZFs/tveX1rn0W5eVWw0D+8nXkCsyVBC6qbHK4MZG/ izTDWolbE8X1hOGd1s70XUAoSaLqggvz6CQ4GsMXT1R7Ms3sviEUL6SPYhMWJywO53 EXZNnQq4VeuA2sY/bfeXwVJVxxkaPoFM9cR8h6+0= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VLojkx044713 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 15:50:45 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 15:50:45 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 15:50:44 -0600 Received: from judy-hp.dhcp.ti.com (judy-hp.dhcp.ti.com [128.247.81.105]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VLoig6062479; Wed, 31 Jan 2024 15:50:44 -0600 From: Judith Mendez <jm@ti.com> To: Ulf Hansson <ulf.hansson@linaro.org> CC: Adrian Hunter <adrian.hunter@intel.com>, <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Randolph Sapp <rs@ti.com>, Vignesh Raghavendra <vigneshr@ti.com> Subject: [PATCH v1 4/5] mmc: sdhci_am654: Add ITAPDLYSEL in sdhci_j721e_4bit_set_clock Date: Wed, 31 Jan 2024 15:50:43 -0600 Message-ID: <20240131215044.3163469-5-jm@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240131215044.3163469-1-jm@ti.com> References: <20240131215044.3163469-1-jm@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789645016829710464 X-GMAIL-MSGID: 1789645016829710464 |
Series |
Add tuning algorithm for delay chain
|
|
Commit Message
Judith Mendez
Jan. 31, 2024, 9:50 p.m. UTC
Add ITAPDLYSEL to sdhci_j721e_4bit_set_clock function.
This allows to set the correct ITAPDLY for timings that
do not carry out tuning.
Fixes: 1accbced1c32 ("mmc: sdhci_am654: Add Support for 4 bit IP on J721E")
Signed-off-by: Judith Mendez <jm@ti.com>
---
drivers/mmc/host/sdhci_am654.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Comments
On 1/31/24 3:50 PM, Judith Mendez wrote: > Add ITAPDLYSEL to sdhci_j721e_4bit_set_clock function. > This allows to set the correct ITAPDLY for timings that > do not carry out tuning. > > Fixes: 1accbced1c32 ("mmc: sdhci_am654: Add Support for 4 bit IP on J721E") You are adding this as a new feature, and not having a feature doesn't mean the initial patch was broken. If this patch was backported to kernels only containing the above patch it would cause more issues, so no need for the fixes tags on this nor the last patch. Andrew > Signed-off-by: Judith Mendez <jm@ti.com> > --- > drivers/mmc/host/sdhci_am654.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c > index 5ac82bc70706..f5dc981c470d 100644 > --- a/drivers/mmc/host/sdhci_am654.c > +++ b/drivers/mmc/host/sdhci_am654.c > @@ -321,6 +321,7 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, > unsigned char timing = host->mmc->ios.timing; > u32 otap_del_sel; > u32 itap_del_ena; > + u32 itap_del_sel; > u32 mask, val; > > /* Setup Output TAP delay */ > @@ -329,12 +330,17 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, > mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK; > val = (0x1 << OTAPDLYENA_SHIFT) | (otap_del_sel << OTAPDLYSEL_SHIFT); > > + /* Setup Input TAP delay */ > itap_del_ena = sdhci_am654->itap_del_ena[timing]; > + itap_del_sel = sdhci_am654->itap_del_sel[timing]; > > - mask |= ITAPDLYENA_MASK; > - val |= (itap_del_ena << ITAPDLYENA_SHIFT); > + mask |= ITAPDLYENA_MASK | ITAPDLYSEL_MASK; > + val |= (itap_del_ena << ITAPDLYENA_SHIFT) | (itap_del_sel << ITAPDLYSEL_SHIFT); > > + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, > + 1 << ITAPCHGWIN_SHIFT); > regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); > + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, 0); > > regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, > sdhci_am654->clkbuf_sel);
Hi Andrew, On 2/1/24 1:57 PM, Andrew Davis wrote: > On 1/31/24 3:50 PM, Judith Mendez wrote: >> Add ITAPDLYSEL to sdhci_j721e_4bit_set_clock function. >> This allows to set the correct ITAPDLY for timings that >> do not carry out tuning. >> >> Fixes: 1accbced1c32 ("mmc: sdhci_am654: Add Support for 4 bit IP on >> J721E") > > You are adding this as a new feature, and not having a feature doesn't mean > the initial patch was broken. If this patch was backported to kernels only > containing the above patch it would cause more issues, so no need for the > fixes tags on this nor the last patch. > Sure, will fix, thanks. >> Signed-off-by: Judith Mendez <jm@ti.com> >> --- >> drivers/mmc/host/sdhci_am654.c | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci_am654.c >> b/drivers/mmc/host/sdhci_am654.c >> index 5ac82bc70706..f5dc981c470d 100644 >> --- a/drivers/mmc/host/sdhci_am654.c >> +++ b/drivers/mmc/host/sdhci_am654.c >> @@ -321,6 +321,7 @@ static void sdhci_j721e_4bit_set_clock(struct >> sdhci_host *host, >> unsigned char timing = host->mmc->ios.timing; >> u32 otap_del_sel; >> u32 itap_del_ena; >> + u32 itap_del_sel; >> u32 mask, val; >> /* Setup Output TAP delay */ >> @@ -329,12 +330,17 @@ static void sdhci_j721e_4bit_set_clock(struct >> sdhci_host *host, >> mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK; >> val = (0x1 << OTAPDLYENA_SHIFT) | (otap_del_sel << >> OTAPDLYSEL_SHIFT); >> + /* Setup Input TAP delay */ >> itap_del_ena = sdhci_am654->itap_del_ena[timing]; >> + itap_del_sel = sdhci_am654->itap_del_sel[timing]; >> - mask |= ITAPDLYENA_MASK; >> - val |= (itap_del_ena << ITAPDLYENA_SHIFT); >> + mask |= ITAPDLYENA_MASK | ITAPDLYSEL_MASK; >> + val |= (itap_del_ena << ITAPDLYENA_SHIFT) | (itap_del_sel << >> ITAPDLYSEL_SHIFT); >> + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, >> + 1 << ITAPCHGWIN_SHIFT); >> regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); >> + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, >> 0); >> regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, >> sdhci_am654->clkbuf_sel); ~ Judith
On 02/02/24 01:27, Andrew Davis wrote: > On 1/31/24 3:50 PM, Judith Mendez wrote: >> Add ITAPDLYSEL to sdhci_j721e_4bit_set_clock function. >> This allows to set the correct ITAPDLY for timings that >> do not carry out tuning. >> >> Fixes: 1accbced1c32 ("mmc: sdhci_am654: Add Support for 4 bit IP on >> J721E") > > You are adding this as a new feature, and not having a feature doesn't mean > the initial patch was broken. If this patch was backported to kernels only > containing the above patch it would cause more issues, so no need for the > fixes tags on this nor the last patch. > Not really a new features. Devices Datasheets have always been clear that static ITAPDLY needs to be configured when tuning isn't performed. Hence a bug as the initial patch (Fixes line) does enable such (affected) modes where tuning isn't performed but ITAPDLY isn't set either. > Andrew > >> Signed-off-by: Judith Mendez <jm@ti.com> >> --- >> drivers/mmc/host/sdhci_am654.c | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci_am654.c >> b/drivers/mmc/host/sdhci_am654.c >> index 5ac82bc70706..f5dc981c470d 100644 >> --- a/drivers/mmc/host/sdhci_am654.c >> +++ b/drivers/mmc/host/sdhci_am654.c >> @@ -321,6 +321,7 @@ static void sdhci_j721e_4bit_set_clock(struct >> sdhci_host *host, >> unsigned char timing = host->mmc->ios.timing; >> u32 otap_del_sel; >> u32 itap_del_ena; >> + u32 itap_del_sel; >> u32 mask, val; >> /* Setup Output TAP delay */ >> @@ -329,12 +330,17 @@ static void sdhci_j721e_4bit_set_clock(struct >> sdhci_host *host, >> mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK; >> val = (0x1 << OTAPDLYENA_SHIFT) | (otap_del_sel << >> OTAPDLYSEL_SHIFT); >> + /* Setup Input TAP delay */ >> itap_del_ena = sdhci_am654->itap_del_ena[timing]; >> + itap_del_sel = sdhci_am654->itap_del_sel[timing]; >> - mask |= ITAPDLYENA_MASK; >> - val |= (itap_del_ena << ITAPDLYENA_SHIFT); >> + mask |= ITAPDLYENA_MASK | ITAPDLYSEL_MASK; >> + val |= (itap_del_ena << ITAPDLYENA_SHIFT) | (itap_del_sel << >> ITAPDLYSEL_SHIFT); >> + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, >> + 1 << ITAPCHGWIN_SHIFT); >> regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); >> + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, >> 0); >> regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, >> sdhci_am654->clkbuf_sel);
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 5ac82bc70706..f5dc981c470d 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -321,6 +321,7 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, unsigned char timing = host->mmc->ios.timing; u32 otap_del_sel; u32 itap_del_ena; + u32 itap_del_sel; u32 mask, val; /* Setup Output TAP delay */ @@ -329,12 +330,17 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK; val = (0x1 << OTAPDLYENA_SHIFT) | (otap_del_sel << OTAPDLYSEL_SHIFT); + /* Setup Input TAP delay */ itap_del_ena = sdhci_am654->itap_del_ena[timing]; + itap_del_sel = sdhci_am654->itap_del_sel[timing]; - mask |= ITAPDLYENA_MASK; - val |= (itap_del_ena << ITAPDLYENA_SHIFT); + mask |= ITAPDLYENA_MASK | ITAPDLYSEL_MASK; + val |= (itap_del_ena << ITAPDLYENA_SHIFT) | (itap_del_sel << ITAPDLYSEL_SHIFT); + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, + 1 << ITAPCHGWIN_SHIFT); regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, 0); regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, sdhci_am654->clkbuf_sel);