Skip to content

Commit dd30dcf

Browse files
Wenchao Chenstorulf
authored andcommitted
mmc: sdhci-sprd: Fix no reset data and command after voltage switch
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]>
1 parent c981cdf commit dd30dcf

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
@@ -470,7 +470,7 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
470470
}
471471

472472
if (IS_ERR(sprd_host->pinctrl))
473-
return 0;
473+
goto reset;
474474

475475
switch (ios->signal_voltage) {
476476
case MMC_SIGNAL_VOLTAGE_180:
@@ -498,6 +498,8 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
498498

499499
/* Wait for 300 ~ 500 us for pin state stable */
500500
usleep_range(300, 500);
501+
502+
reset:
501503
sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
502504

503505
return 0;

0 commit comments

Comments
 (0)