Skip to content

Commit 463f0cc

Browse files
Wenchao Chensmb49
authored andcommitted
mmc: sdhci-sprd: Fix no reset data and command after voltage switch
BugLink: https://bugs.launchpad.net/bugs/2003896 commit dd30dcf upstream. After switching the voltage, no reset data and command will cause CMD2 timeout. Fixes: 29ca763 ("mmc: sdhci-sprd: Add pin control support for voltage switch") Signed-off-by: Wenchao Chen <[email protected]> Acked-by: Adrian Hunter <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 901a6cf commit 463f0cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/host/sdhci-sprd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
431431
}
432432

433433
if (IS_ERR(sprd_host->pinctrl))
434-
return 0;
434+
goto reset;
435435

436436
switch (ios->signal_voltage) {
437437
case MMC_SIGNAL_VOLTAGE_180:
@@ -459,6 +459,8 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
459459

460460
/* Wait for 300 ~ 500 us for pin state stable */
461461
usleep_range(300, 500);
462+
463+
reset:
462464
sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
463465

464466
return 0;

0 commit comments

Comments
 (0)