Skip to content

Commit 32a9e0c

Browse files
Wolfram Sangstorulf
authored andcommitted
mmc: tmio: improve bringing HW to a sane state with MMC_POWER_OFF
Further testing of error cases revealed that downgrade is not enough, so we need to reset the SCC which is done by calling the custom reset function. This reset function can distinguish between the various SDHI variants, so protecting the call with MIN_RCAR2 is enough here. Fixes: 24ce2d7 ("mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF") Reported-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Yoshihiro Shimoda <[email protected]> Tested-by: Yoshihiro Shimoda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent a42a7ec commit 32a9e0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mmc/host/tmio_mmc_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,9 +927,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
927927
switch (ios->power_mode) {
928928
case MMC_POWER_OFF:
929929
tmio_mmc_power_off(host);
930-
/* Downgrade ensures a sane state for tuning HW (e.g. SCC) */
931-
if (host->mmc->ops->hs400_downgrade)
932-
host->mmc->ops->hs400_downgrade(host->mmc);
930+
/* For R-Car Gen2+, we need to reset SDHI specific SCC */
931+
if (host->pdata->flags & TMIO_MMC_MIN_RCAR2)
932+
host->reset(host);
933933
host->set_clock(host, 0);
934934
break;
935935
case MMC_POWER_UP:

0 commit comments

Comments
 (0)