mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 16:02:57 +00:00
mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF
When powering off a card, we need to disable the tuning HW (like SCC for
the Renesas SDHI) to get to a sane state and allow for re-tuning new
cards. This was hidden before because we wrongly did that in hw_reset()
before which was an unintended use of hw_reset(). Now that we corrected
the use of hw_reset() meanwhile, we revealed this shortcoming and need
to fix it properly by explicitly calling the downgrade callback.
Fixes: 6e7d4de108 ("mmc: renesas_sdhi: move wrong 'hw_reset' to 'reset'")
Suggested-by: Takeshi Saito <[email protected]>
Reviewed-by: Takeshi Saito <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Tested-by: Niklas Söderlund <[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]>
This commit is contained in:
committed by
Ulf Hansson
parent
1023e290ba
commit
24ce2d7b8b
@@ -927,6 +927,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
switch (ios->power_mode) {
|
||||
case MMC_POWER_OFF:
|
||||
tmio_mmc_power_off(host);
|
||||
/* Downgrade ensures a sane state for tuning HW (e.g. SCC) */
|
||||
if (host->mmc->ops->hs400_downgrade)
|
||||
host->mmc->ops->hs400_downgrade(host->mmc);
|
||||
host->set_clock(host, 0);
|
||||
break;
|
||||
case MMC_POWER_UP:
|
||||
|
||||
Reference in New Issue
Block a user