Skip to content

Commit ace323f

Browse files
bigunclemaxstorulf
authored andcommitted
mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128
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: 43658a5 ("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]>
1 parent f8def10 commit ace323f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mmc/host/sdhci-of-dwcmshc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
626626

627627
/* perform tuning */
628628
sdhci_start_tuning(host);
629+
host->tuning_loop_count = 128;
629630
host->tuning_err = __sdhci_execute_tuning(host, opcode);
630631
if (host->tuning_err) {
631632
/* disable auto-tuning upon tuning error */

0 commit comments

Comments
 (0)