aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZiyuan Xu <[email protected]>2017-01-17 09:22:56 +0800
committerUlf Hansson <[email protected]>2017-01-23 10:19:30 +0100
commite9748e0364fe82dc037d22900ff13a62d04518bf (patch)
tree09c9b72e50f007ef59a19beb173bad5eabb398db
parent7a308bb3016f57e5be11a677d15b821536419d36 (diff)
mmc: dw_mmc: force setup bus if active slots exist
It's necessary to setup bus if any slots are present. - update clock after ctrl reset - if the host has genpd node, we can guarantee the clock is available before starting request. Otherwies, the clock register is reset once power off the pd, and host can't output the active clock during communication. Fixes: e9ed8835e990 ("mmc: dw_mmc: add runtime PM callback") Fixes: df9bcc2bc0a1 ("mmc: dw_mmc: add missing codes for runtime resume") cc: <[email protected]> Reported-by: Randy Li <[email protected]> Reported-by: S. Gilles <[email protected]> Signed-off-by: Ziyuan Xu <[email protected]> Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r--drivers/mmc/host/dw_mmc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b44306b886cb..73db08558e4d 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3354,10 +3354,11 @@ int dw_mci_runtime_resume(struct device *dev)
if (!slot)
continue;
- if (slot->mmc->pm_flags & MMC_PM_KEEP_POWER) {
+ if (slot->mmc->pm_flags & MMC_PM_KEEP_POWER)
dw_mci_set_ios(slot->mmc, &slot->mmc->ios);
- dw_mci_setup_bus(slot, true);
- }
+
+ /* Force setup bus to guarantee available clock output */
+ dw_mci_setup_bus(slot, true);
}
/* Now that slots are all setup, we can enable card detect */