diff options
author | rrajk <rrajk@nvidia.com> | 2013-02-26 16:45:09 +0530 |
---|---|---|
committer | Mrutyunjay Sawant <msawant@nvidia.com> | 2013-03-07 03:32:00 -0800 |
commit | 11a79b035f42af7addde568a9b7598f64c657e58 (patch) | |
tree | a6cafb68da32d783fa349540996c4689e73bc521 /drivers/mmc | |
parent | 0ed2cea2af44be08dac592fe9b9b2176b136a3f0 (diff) |
mmc: host: sdhci: Add data/cmd error prints
Added data and cmd error prints to debug the system.
Change-Id: Ie09bf54af733043a80f540ea74acffd8f112de05
Signed-off-by: rrajk <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/204168
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index dccd8c671906..22734914374f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2187,11 +2187,16 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) return; } - if (intmask & SDHCI_INT_TIMEOUT) + if (intmask & SDHCI_INT_TIMEOUT) { host->cmd->error = -ETIMEDOUT; - else if (intmask & (SDHCI_INT_CRC | SDHCI_INT_END_BIT | - SDHCI_INT_INDEX)) + pr_err("%s: Command timeout error, intmask: %x\n", + mmc_hostname(host->mmc), intmask); + } else if (intmask & (SDHCI_INT_CRC | SDHCI_INT_END_BIT | + SDHCI_INT_INDEX)) { host->cmd->error = -EILSEQ; + pr_err("%s: Command CRC or END bit error, intmask: %x\n", + mmc_hostname(host->mmc), intmask); + } if (host->cmd->error) { tasklet_schedule(&host->finish_tasklet); @@ -2290,15 +2295,21 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) return; } - if (intmask & SDHCI_INT_DATA_TIMEOUT) + if (intmask & SDHCI_INT_DATA_TIMEOUT) { host->data->error = -ETIMEDOUT; - else if (intmask & SDHCI_INT_DATA_END_BIT) + pr_err("%s: Data Timeout error, intmask: %x\n", + mmc_hostname(host->mmc), intmask); + } else if (intmask & SDHCI_INT_DATA_END_BIT) { host->data->error = -EILSEQ; - else if ((intmask & SDHCI_INT_DATA_CRC) && + pr_err("%s: Data END Bit error, intmask: %x\n", + mmc_hostname(host->mmc), intmask); + } else if ((intmask & SDHCI_INT_DATA_CRC) && SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND)) - != MMC_BUS_TEST_R) + != MMC_BUS_TEST_R) { host->data->error = -EILSEQ; - else if (intmask & SDHCI_INT_ADMA_ERROR) { + pr_err("%s: Data CRC error, intmask: %x\n", + mmc_hostname(host->mmc), intmask); + } else if (intmask & SDHCI_INT_ADMA_ERROR) { pr_err("%s: ADMA error\n", mmc_hostname(host->mmc)); sdhci_show_adma_error(host); host->data->error = -EIO; |