浏览代码

atmel-mci: debugfs: enable clock before dumping regs

Make sure that the peripheral clock is enabled before reading the MMIO
registers for the debugfs "regs" dump.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Haavard Skinnemoen 16 年之前
父节点
当前提交
87e60f2b80
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/mmc/host/atmel-mci.c

+ 2 - 0
drivers/mmc/host/atmel-mci.c

@@ -195,7 +195,9 @@ static int atmci_regs_show(struct seq_file *s, void *v)
 
 	/* Grab a more or less consistent snapshot */
 	spin_lock_irq(&host->mmc->lock);
+	clk_enable(host->mck);
 	memcpy_fromio(buf, host->regs, MCI_REGS_SIZE);
+	clk_disable(host->mck);
 	spin_unlock_irq(&host->mmc->lock);
 
 	seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n",