mmc: dw_mmc: Avoid accessing registers in runtime suspended state
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 23 Feb 2018 08:47:25 +0000 (16:47 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 27 Feb 2018 14:12:36 +0000 (15:12 +0100)
commit5b43df8b4c1a7f0c3fbf793c9566068e6b1e570c
tree9d8a72f1db810fe6705d3597fe9999bda4ed1ad9
parent0d84b9e5631d923744767dc6608672df906dd092
mmc: dw_mmc: Avoid accessing registers in runtime suspended state

cat /sys/kernel/debug/mmc0/regs will hang up the system since
it's in runtime suspended state, so the genpd and biu_clk is
off. This patch fixes this problem by calling pm_runtime_get_sync
to wake it up before reading the registers.

Fixes: e9ed8835e990 ("mmc: dw_mmc: add runtime PM callback")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c