All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: update clock after ctrl reset in runtime resume
@ 2017-01-03  6:46 Ziyuan Xu
  2017-01-03  6:59 ` Shawn Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Ziyuan Xu @ 2017-01-03  6:46 UTC (permalink / raw)
  To: ulf.hansson, jh80.chung, shawn.lin
  Cc: linux-mmc, randy.li, linux-rockchip, Ziyuan Xu

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 --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);
 		}
 	}
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-04  8:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-03  6:46 [PATCH] mmc: dw_mmc: update clock after ctrl reset in runtime resume Ziyuan Xu
2017-01-03  6:59 ` Shawn Lin
2017-01-04  8:28   ` Jaehoon Chung
     [not found]     ` <3b5329de-6aa9-4365-771b-11947989e910-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-01-04  8:39       ` Ziyuan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.