summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJudith Mendez <jm@ti.com>2024-04-18 14:01:00 -0500
committerAndrejs Cainikovs <andrejs.cainikovs@toradex.com>2024-05-02 11:47:22 +0200
commit858fc64d422dea150b519075e452b55c18639c23 (patch)
treed1d356f54dd2afe53967e92f6d3648c8ae918562 /drivers
parent7a4b337156751d4ddde6516b079d86eab334778b (diff)
mmc: am654_sdhci: Fix ITAPDLY for HS400 timing
At HS400 mode the ITAPDLY value is that from High Speed mode which is incorrect and may cause boot failures. The ITAPDLY for HS400 speed mode should be the same as ITAPDLY as HS200 timing after tuning is executed. Add the functionality to save ITAPDLY from HS200 tuning and save as HS400 ITAPDLY. Upstream-Status: Backport [f13a830e6e4ad884069e25c7cd2dc333b474da98] Fixes: c964447ea3d6 ("mmc: am654_sdhci: Add support for input tap delay") Signed-off-by: Judith Mendez <jm@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/am654_sdhci.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index 6780478f73..45a51c5668 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -295,6 +295,11 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host)
return ret;
plat->dll_enable = true;
+ if (mode == MMC_HS_400) {
+ plat->itap_del_ena[mode] = ENABLE;
+ plat->itap_del_sel[mode] = plat->itap_del_sel[mode - 1];
+ }
+
am654_sdhci_write_itapdly(plat, plat->itap_del_sel[mode],
plat->itap_del_ena[mode]);
} else {
@@ -486,6 +491,9 @@ static int am654_sdhci_execute_tuning(struct mmc *mmc, u8 opcode)
itap = am654_sdhci_calculate_itap(dev, fail_window, fail_index,
plat->dll_enable);
+ /* Save ITAPDLY */
+ plat->itap_del_sel[mode] = itap;
+
am654_sdhci_write_itapdly(plat, itap, plat->itap_del_ena[mode]);
return 0;