]> Git Repo - linux.git/commitdiff
mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128
authorMaksim Kiselev <[email protected]>
Tue, 2 Apr 2024 09:35:39 +0000 (12:35 +0300)
committerUlf Hansson <[email protected]>
Thu, 4 Apr 2024 09:05:19 +0000 (11:05 +0200)
Fix SD card tuning error by increasing tuning loop count
from 40(MAX_TUNING_LOOP) to 128.

For some reason the tuning algorithm requires to move through all the taps
of delay line even if the THRESHOLD_MODE (bit 2 in AT_CTRL_R) is used
instead of the LARGEST_WIN_MODE.

Tested-by: Drew Fustini <[email protected]>
Tested-by: Xi Ruoyao <[email protected]>
Signed-off-by: Maksim Kiselev <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Fixes: 43658a542ebf ("mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520")
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
drivers/mmc/host/sdhci-of-dwcmshc.c

index 1d8f5a76096aeb3c836722b3f97226d7dd2c5201..f2e4a93ed1d61a22d4601fefe2a120caf2b19333 100644 (file)
@@ -626,6 +626,7 @@ static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
 
        /* perform tuning */
        sdhci_start_tuning(host);
+       host->tuning_loop_count = 128;
        host->tuning_err = __sdhci_execute_tuning(host, opcode);
        if (host->tuning_err) {
                /* disable auto-tuning upon tuning error */
This page took 0.064261 seconds and 4 git commands to generate.