Commit 4d5123a0 authored by Shawn Lin's avatar Shawn Lin Committed by Greg Kroah-Hartman

mmc: dw_mmc: Avoid accessing registers in runtime suspended state

commit 5b43df8b upstream.

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: e9ed8835 ("mmc: dw_mmc: add runtime PM callback")
Cc: <>
Signed-off-by: default avatarShawn Lin <>
Reviewed-by: default avatarJaehoon Chung <>
Signed-off-by: default avatarUlf Hansson <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent cb65fc21
......@@ -165,6 +165,8 @@ static int dw_mci_regs_show(struct seq_file *s, void *v)
struct dw_mci *host = s->private;
seq_printf(s, "STATUS:\t0x%08x\n", mci_readl(host, STATUS));
seq_printf(s, "RINTSTS:\t0x%08x\n", mci_readl(host, RINTSTS));
seq_printf(s, "CMD:\t0x%08x\n", mci_readl(host, CMD));
......@@ -172,6 +174,8 @@ static int dw_mci_regs_show(struct seq_file *s, void *v)
seq_printf(s, "INTMASK:\t0x%08x\n", mci_readl(host, INTMASK));
seq_printf(s, "CLKENA:\t0x%08x\n", mci_readl(host, CLKENA));
return 0;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment