mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128
PATCH 1/1 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.
---
Previous discussion was here:
https://lore.kernel.org/lkml/CALHCpMhc1F5Ue7U_gsDXREHUZRVQJNYRCJxYxoNqbN=-39jf7A@mail.gmail.com/
drivers/mmc/host/sdhci-of-dwcmshc.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci-of-dwcmshc.c +1 -0
@@ -706,6 +706,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 */
Signature · 1 line
2.40.1
Quoted 10 lines · Maksim Kiselev
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 inAT_CTRL_R) is used instead of theLARGEST_WIN_MODE.Tested-by Drew Fustini <[email protected]>Tested-by Xi Ruoyao <[email protected]>Signed-off-by Maksim Kiselev <[email protected]>
Quoted 19 lines
---
Previous discussion was here:
https://lore.kernel.org/lkml/CALHCpMhc1F5Ue7U_gsDXREHUZRVQJNYRCJxYxoNqbN=-39jf7A@mail.gmail.com/drivers/mmc/host/sdhci-of-dwcmshc.c | 1 + 1 file changed, 1 insertion(+)drivers/mmc/host/sdhci-of-dwcmshc.c +1
-0@@ -706,6 +706,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 */
Quoted 11 lines · Maksim Kiselev
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 inAT_CTRL_R) is used instead of theLARGEST_WIN_MODE.Tested-by Drew Fustini <[email protected]>Tested-by Xi Ruoyao <[email protected]>Signed-off-by Maksim Kiselev <[email protected]>
Applied for fixes and by adding a fixes+stable tag, thanks!
Kind regards
Uffe
Quoted 22 lines
---
Previous discussion was here:
https://lore.kernel.org/lkml/CALHCpMhc1F5Ue7U_gsDXREHUZRVQJNYRCJxYxoNqbN=-39jf7A@mail.gmail.com/drivers/mmc/host/sdhci-of-dwcmshc.c | 1 + 1 file changed, 1 insertion(+)drivers/mmc/host/sdhci-of-dwcmshc.c +1
-1@@ -706,6 +706,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 */ --2.40.1