public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sdhci: sdhci_dumpregs: allow private information to be dumped on error
@ 2010-10-19 18:27 Philip Rakity
  2010-10-19 19:47 ` Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Rakity @ 2010-10-19 18:27 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org

Our controller has private registers that are useful to see on error.
define a new host->ops to allow these registers to be printed

Signed-off-by: Philip Rakity <prakity@marvell.com>
---
 drivers/mmc/host/sdhci.c |    2 ++
 drivers/mmc/host/sdhci.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 782c0ee..fba6e28 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -85,6 +85,8 @@ static void sdhci_dumpregs(struct sdhci_host *host)
 		printk(KERN_DEBUG DRIVER_NAME ": ADMA Err: 0x%08x | ADMA Ptr: 0x%08x\n",
 		       readl(host->ioaddr + SDHCI_ADMA_ERROR),
 		       readl(host->ioaddr + SDHCI_ADMA_ADDRESS));
+	if (host->ops->print_private_info)
+		host->ops->print_private_info(host);
 
 	printk(KERN_DEBUG DRIVER_NAME ": ===========================================\n");
 }
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index b7b8a3b..2e11ff9 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -215,6 +215,7 @@ struct sdhci_ops {
 	void (*platform_send_init_74_clocks)(struct sdhci_host *host,
 					     u8 power_mode);
 	unsigned int    (*get_ro)(struct sdhci_host *host);
+	void		(*print_private_info)(struct sdhci_host *host);
 };
 
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
-- 
1.6.0.4


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

end of thread, other threads:[~2010-10-20 11:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 18:27 [PATCH] sdhci: sdhci_dumpregs: allow private information to be dumped on error Philip Rakity
2010-10-19 19:47 ` Wolfram Sang
2010-10-19 20:04   ` Chris Ball
2010-10-19 21:47     ` Philip Rakity
2010-10-20 11:16       ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox