* [PATCH] mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel
@ 2023-11-10 7:25 Vignesh Raghavendra
2023-11-20 12:08 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: Vignesh Raghavendra @ 2023-11-10 7:25 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson
Cc: linux-mmc, linux-kernel, Vignesh Raghavendra, linux-arm-kernel,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree
ti,otap-del-sel has been deprecated since v5.7 and there are no users of
this property and no documentation in the DT bindings either.
Drop the fallback code looking for this property, this makes
sdhci_am654_get_otap_delay() much easier to read as all the TAP values
can be handled via a single iterator loop.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
Based on discussions at [1]
https://lore.kernel.org/linux-mmc/CAPDyKFrCSTW3G6H7qS89d+UQ6RJcAYcKSPULVT8J7XKsUDpHdw@mail.gmail.com/
CC'ing DT maintainers to see if there any objection to remove
undocumented and deprecated property.
drivers/mmc/host/sdhci_am654.c | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index 967bd2dfcda1..402fba0fa418 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -577,32 +577,15 @@ static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
int i;
int ret;
- ret = device_property_read_u32(dev, td[MMC_TIMING_LEGACY].otap_binding,
- &sdhci_am654->otap_del_sel[MMC_TIMING_LEGACY]);
- if (ret) {
- /*
- * ti,otap-del-sel-legacy is mandatory, look for old binding
- * if not found.
- */
- ret = device_property_read_u32(dev, "ti,otap-del-sel",
- &sdhci_am654->otap_del_sel[0]);
- if (ret) {
- dev_err(dev, "Couldn't find otap-del-sel\n");
-
- return ret;
- }
-
- dev_info(dev, "Using legacy binding ti,otap-del-sel\n");
- sdhci_am654->legacy_otapdly = true;
-
- return 0;
- }
-
for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) {
ret = device_property_read_u32(dev, td[i].otap_binding,
&sdhci_am654->otap_del_sel[i]);
if (ret) {
+ if (i == MMC_TIMING_LEGACY) {
+ dev_err(dev, "Couldn't find mandatory ti,otap-del-sel-legacy\n");
+ return ret;
+ }
dev_dbg(dev, "Couldn't find %s\n",
td[i].otap_binding);
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel
2023-11-10 7:25 [PATCH] mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel Vignesh Raghavendra
@ 2023-11-20 12:08 ` Adrian Hunter
2023-11-22 5:53 ` Vignesh Raghavendra
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2023-11-20 12:08 UTC (permalink / raw)
To: Vignesh Raghavendra, Ulf Hansson
Cc: linux-mmc, linux-kernel, linux-arm-kernel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
On 10/11/23 09:25, Vignesh Raghavendra wrote:
> ti,otap-del-sel has been deprecated since v5.7 and there are no users of
> this property and no documentation in the DT bindings either.
> Drop the fallback code looking for this property, this makes
> sdhci_am654_get_otap_delay() much easier to read as all the TAP values
> can be handled via a single iterator loop.
>
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
One minor comment below, otherwise:
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>
> Based on discussions at [1]
> https://lore.kernel.org/linux-mmc/CAPDyKFrCSTW3G6H7qS89d+UQ6RJcAYcKSPULVT8J7XKsUDpHdw@mail.gmail.com/
>
> CC'ing DT maintainers to see if there any objection to remove
> undocumented and deprecated property.
>
> drivers/mmc/host/sdhci_am654.c | 25 ++++---------------------
> 1 file changed, 4 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index 967bd2dfcda1..402fba0fa418 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -577,32 +577,15 @@ static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
> int i;
> int ret;
>
> - ret = device_property_read_u32(dev, td[MMC_TIMING_LEGACY].otap_binding,
> - &sdhci_am654->otap_del_sel[MMC_TIMING_LEGACY]);
> - if (ret) {
> - /*
> - * ti,otap-del-sel-legacy is mandatory, look for old binding
> - * if not found.
> - */
> - ret = device_property_read_u32(dev, "ti,otap-del-sel",
> - &sdhci_am654->otap_del_sel[0]);
> - if (ret) {
> - dev_err(dev, "Couldn't find otap-del-sel\n");
> -
> - return ret;
> - }
> -
> - dev_info(dev, "Using legacy binding ti,otap-del-sel\n");
> - sdhci_am654->legacy_otapdly = true;
With this removal, legacy_otapdly is not used anymore and should be
removed also.
> -
> - return 0;
> - }
> -
> for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) {
>
> ret = device_property_read_u32(dev, td[i].otap_binding,
> &sdhci_am654->otap_del_sel[i]);
> if (ret) {
> + if (i == MMC_TIMING_LEGACY) {
> + dev_err(dev, "Couldn't find mandatory ti,otap-del-sel-legacy\n");
> + return ret;
> + }
> dev_dbg(dev, "Couldn't find %s\n",
> td[i].otap_binding);
> /*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel
2023-11-20 12:08 ` Adrian Hunter
@ 2023-11-22 5:53 ` Vignesh Raghavendra
0 siblings, 0 replies; 3+ messages in thread
From: Vignesh Raghavendra @ 2023-11-22 5:53 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson
Cc: linux-mmc, linux-kernel, linux-arm-kernel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
On 20/11/23 17:38, Adrian Hunter wrote:
> On 10/11/23 09:25, Vignesh Raghavendra wrote:
>> ti,otap-del-sel has been deprecated since v5.7 and there are no users of
>> this property and no documentation in the DT bindings either.
>> Drop the fallback code looking for this property, this makes
>> sdhci_am654_get_otap_delay() much easier to read as all the TAP values
>> can be handled via a single iterator loop.
>>
>> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
>
> One minor comment below, otherwise:
>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
>
>> ---
>>
>> Based on discussions at [1]
>> https://lore.kernel.org/linux-mmc/CAPDyKFrCSTW3G6H7qS89d+UQ6RJcAYcKSPULVT8J7XKsUDpHdw@mail.gmail.com/
>>
>> CC'ing DT maintainers to see if there any objection to remove
>> undocumented and deprecated property.
>>
>> drivers/mmc/host/sdhci_am654.c | 25 ++++---------------------
>> 1 file changed, 4 insertions(+), 21 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
>> index 967bd2dfcda1..402fba0fa418 100644
>> --- a/drivers/mmc/host/sdhci_am654.c
>> +++ b/drivers/mmc/host/sdhci_am654.c
>> @@ -577,32 +577,15 @@ static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
>> int i;
>> int ret;
>>
>> - ret = device_property_read_u32(dev, td[MMC_TIMING_LEGACY].otap_binding,
>> - &sdhci_am654->otap_del_sel[MMC_TIMING_LEGACY]);
>> - if (ret) {
>> - /*
>> - * ti,otap-del-sel-legacy is mandatory, look for old binding
>> - * if not found.
>> - */
>> - ret = device_property_read_u32(dev, "ti,otap-del-sel",
>> - &sdhci_am654->otap_del_sel[0]);
>> - if (ret) {
>> - dev_err(dev, "Couldn't find otap-del-sel\n");
>> -
>> - return ret;
>> - }
>> -
>> - dev_info(dev, "Using legacy binding ti,otap-del-sel\n");
>> - sdhci_am654->legacy_otapdly = true;
>
> With this removal, legacy_otapdly is not used anymore and should be
> removed also.
>
Indeed, will post v2 with cleanup. Thanks for the review!
>> -
>> - return 0;
>> - }
>> -
>> for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) {
>>
>> ret = device_property_read_u32(dev, td[i].otap_binding,
>> &sdhci_am654->otap_del_sel[i]);
>> if (ret) {
>> + if (i == MMC_TIMING_LEGACY) {
>> + dev_err(dev, "Couldn't find mandatory ti,otap-del-sel-legacy\n");
>> + return ret;
>> + }
>> dev_dbg(dev, "Couldn't find %s\n",
>> td[i].otap_binding);
>> /*
>
--
Regards
Vignesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-22 5:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 7:25 [PATCH] mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel Vignesh Raghavendra
2023-11-20 12:08 ` Adrian Hunter
2023-11-22 5:53 ` Vignesh Raghavendra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).