Skip to content

Commit 94fb20c

Browse files
bigunclemaxBrian Maly
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]> Orabug: 36811057 (cherry picked from commit ace323f) cherry-pick-repo=kernel/git/torvalds/linux.git unmodified-from-upstream: ace323f Signed-off-by: Mikhael Goikhman <[email protected]> Signed-off-by: Qing Huang <[email protected]> Reviewed-by: Sharath Srinivasan <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent f455a93 commit 94fb20c

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
@@ -612,6 +612,7 @@ static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
612612

613613
/* perform tuning */
614614
sdhci_start_tuning(host);
615+
host->tuning_loop_count = 128;
615616
host->tuning_err = __sdhci_execute_tuning(host, opcode);
616617
if (host->tuning_err) {
617618
/* disable auto-tuning upon tuning error */

0 commit comments

Comments
 (0)