Skip to content

Commit 5cb2f92

Browse files
r-vigneshstorulf
authored andcommitted
mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel
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> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20231122060215.2074799-1-vigneshr@ti.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent e18a386 commit 5cb2f92

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

drivers/mmc/host/sdhci_am654.c

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ static const struct timing_data td[] = {
141141

142142
struct sdhci_am654_data {
143143
struct regmap *base;
144-
bool legacy_otapdly;
145144
int otap_del_sel[ARRAY_SIZE(td)];
146145
int itap_del_sel[ARRAY_SIZE(td)];
147146
int clkbuf_sel;
@@ -272,11 +271,7 @@ static void sdhci_am654_set_clock(struct sdhci_host *host, unsigned int clock)
272271
sdhci_set_clock(host, clock);
273272

274273
/* Setup DLL Output TAP delay */
275-
if (sdhci_am654->legacy_otapdly)
276-
otap_del_sel = sdhci_am654->otap_del_sel[0];
277-
else
278-
otap_del_sel = sdhci_am654->otap_del_sel[timing];
279-
274+
otap_del_sel = sdhci_am654->otap_del_sel[timing];
280275
otap_del_ena = (timing > MMC_TIMING_UHS_SDR25) ? 1 : 0;
281276

282277
mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK;
@@ -314,10 +309,7 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host,
314309
u32 mask, val;
315310

316311
/* Setup DLL Output TAP delay */
317-
if (sdhci_am654->legacy_otapdly)
318-
otap_del_sel = sdhci_am654->otap_del_sel[0];
319-
else
320-
otap_del_sel = sdhci_am654->otap_del_sel[timing];
312+
otap_del_sel = sdhci_am654->otap_del_sel[timing];
321313

322314
mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK;
323315
val = (0x1 << OTAPDLYENA_SHIFT) |
@@ -577,32 +569,15 @@ static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
577569
int i;
578570
int ret;
579571

580-
ret = device_property_read_u32(dev, td[MMC_TIMING_LEGACY].otap_binding,
581-
&sdhci_am654->otap_del_sel[MMC_TIMING_LEGACY]);
582-
if (ret) {
583-
/*
584-
* ti,otap-del-sel-legacy is mandatory, look for old binding
585-
* if not found.
586-
*/
587-
ret = device_property_read_u32(dev, "ti,otap-del-sel",
588-
&sdhci_am654->otap_del_sel[0]);
589-
if (ret) {
590-
dev_err(dev, "Couldn't find otap-del-sel\n");
591-
592-
return ret;
593-
}
594-
595-
dev_info(dev, "Using legacy binding ti,otap-del-sel\n");
596-
sdhci_am654->legacy_otapdly = true;
597-
598-
return 0;
599-
}
600-
601572
for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) {
602573

603574
ret = device_property_read_u32(dev, td[i].otap_binding,
604575
&sdhci_am654->otap_del_sel[i]);
605576
if (ret) {
577+
if (i == MMC_TIMING_LEGACY) {
578+
dev_err(dev, "Couldn't find mandatory ti,otap-del-sel-legacy\n");
579+
return ret;
580+
}
606581
dev_dbg(dev, "Couldn't find %s\n",
607582
td[i].otap_binding);
608583
/*

0 commit comments

Comments
 (0)