From 62ececec50f420a06c710424285fe2acad9d77c8 Mon Sep 17 00:00:00 2001 From: Chuanxiao Dong Date: Mon, 24 Oct 2011 13:10:00 +0800 Subject: [PATCH] mmc: SDHCI: add some additional messages for SDHCI driver to dump BZ: 9241 Add some additional debug messages in sdhci_dumpregs for debug purpose. With this messages, it will be easily to identify what is going on in driver when we encounter some issue. Change-Id: I93eb910b808b485536dfd9882d668b4e284cdd28 Signed-off-by: Chuanxiao Dong Reviewed-on: http://android.intel.com:8080/23126 Reviewed-by: Gross, Mark Tested-by: Gross, Mark --- drivers/mmc/host/sdhci.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ccbf72a..012bac0 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -112,6 +112,34 @@ static void sdhci_dumpregs(struct sdhci_host *host) readl(host->ioaddr + SDHCI_ADMA_ERROR), readl(host->ioaddr + SDHCI_ADMA_ADDRESS)); + if (host->cmd) + printk(KERN_DEBUG DRIVER_NAME + ": command pending, Cmdcode: %d\n", + host->cmd->opcode); + else + printk(KERN_DEBUG DRIVER_NAME ": No command pending\n"); + + if (host->data) + printk(KERN_DEBUG DRIVER_NAME ": data pending\n"); + else + printk(KERN_DEBUG DRIVER_NAME ": No data pending\n"); + + printk(KERN_DEBUG DRIVER_NAME ": pwr: 0x%x | clock: %d\n", + host->pwr, host->clock); +#ifdef CONFIG_PM_RUNTIME + printk(KERN_DEBUG DRIVER_NAME ": usage_count %d | Runtime_status %d\n", + atomic_read(&host->mmc->parent->power.usage_count), + host->mmc->parent->power.runtime_status); +#endif + if (test_bit(TASKLET_STATE_SCHED, &host->finish_tasklet.state)) + printk(KERN_DEBUG DRIVER_NAME + ": finish_tasklet pending running, state %ld\n", + host->finish_tasklet.state); + else + printk(KERN_DEBUG DRIVER_NAME + ": finish_tasklet NOT start, state %ld\n", + host->finish_tasklet.state); + printk(KERN_DEBUG DRIVER_NAME ": ===========================================\n"); } -- 2.7.4