diff mbox

mmc: dw_mmc: update clock after ctrl reset in runtime resume

Message ID 1483425987-21805-1-git-send-email-xzy.xu@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

ziyuan Jan. 3, 2017, 6:46 a.m. UTC
Immediately after reset, issue the command which sets
update_clock_register_only bit, the card clock will restart.

MMC_PM_KEEP_POWER is disabled for SD card and eMMC slots, so that they
have no chance to invoke dw_mci_setup_bus for update clock behaviour.
Let's consummate it.

Fixes: e9ed883 ("mmc: dw_mmc: add runtime PM callback")
Reported-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
---
 drivers/mmc/host/dw_mmc.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b44306b..71715b4 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3357,6 +3357,8 @@  int dw_mci_runtime_resume(struct device *dev)
 		if (slot->mmc->pm_flags & MMC_PM_KEEP_POWER) {
 			dw_mci_set_ios(slot->mmc, &slot->mmc->ios);
 			dw_mci_setup_bus(slot, true);
+		} else {
+			mci_send_cmd(slot, SDMMC_CMD_UPD_CLK, 0);
 		}
 	}