Skip to content

Commit

Permalink
atmel-mci: debugfs: enable clock before dumping regs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen authored and Pierre Ossman committed Sep 20, 2008
1 parent fe246eb commit 87e60f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mmc/host/atmel-mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 87e60f2

Please sign in to comment.