mmc: sdhci: fix issue with auto cmd err detection
As per specification, auto cmd error status register is valid only when auto cmd error bit is set in Error interrupt status register. CRs-fixed: 515513 Change-Id: Id1013e1705d8efdba0171dcad14f783607d38ef3 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> [subhashj@codeaurora.org: fixed minor merge conflict] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
parent
39ba9d6667
commit
d453e3e1ff
2 changed files with 10 additions and 2 deletions
|
@ -129,7 +129,7 @@ static void sdhci_dumpregs(struct sdhci_host *host)
|
|||
sdhci_readl(host, SDHCI_INT_ENABLE),
|
||||
sdhci_readl(host, SDHCI_SIGNAL_ENABLE));
|
||||
pr_info(DRIVER_NAME ": AC12 err: 0x%08x | Slot int: 0x%08x\n",
|
||||
sdhci_readw(host, SDHCI_AUTO_CMD_ERR),
|
||||
host->auto_cmd_err_sts,
|
||||
sdhci_readw(host, SDHCI_SLOT_INT_STATUS));
|
||||
pr_info(DRIVER_NAME ": Caps: 0x%08x | Caps_1: 0x%08x\n",
|
||||
sdhci_readl(host, SDHCI_CAPABILITIES),
|
||||
|
@ -2480,6 +2480,7 @@ static void sdhci_tasklet_finish(unsigned long param)
|
|||
host->mrq = NULL;
|
||||
host->cmd = NULL;
|
||||
host->data = NULL;
|
||||
host->auto_cmd_err_sts = 0;
|
||||
|
||||
#ifndef SDHCI_USE_LEDS_CLASS
|
||||
sdhci_deactivate_led(host);
|
||||
|
@ -2554,7 +2555,9 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask)
|
|||
host->cmd->error = -EILSEQ;
|
||||
|
||||
if (intmask & SDHCI_INT_AUTO_CMD_ERR) {
|
||||
auto_cmd_status = sdhci_readw(host, SDHCI_AUTO_CMD_ERR);
|
||||
auto_cmd_status = host->auto_cmd_err_sts;
|
||||
pr_err("%s: %s: AUTO CMD err sts 0x%08x\n",
|
||||
mmc_hostname(host->mmc), __func__, auto_cmd_status);
|
||||
if (auto_cmd_status & (SDHCI_AUTO_CMD12_NOT_EXEC |
|
||||
SDHCI_AUTO_CMD_INDEX_ERR |
|
||||
SDHCI_AUTO_CMD_ENDBIT_ERR))
|
||||
|
@ -2811,6 +2814,9 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
|
|||
}
|
||||
|
||||
do {
|
||||
if (intmask & SDHCI_INT_AUTO_CMD_ERR)
|
||||
host->auto_cmd_err_sts = sdhci_readw(host,
|
||||
SDHCI_AUTO_CMD_ERR);
|
||||
/* Clear selected interrupts. */
|
||||
mask = intmask & (SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK |
|
||||
SDHCI_INT_BUS_POWER);
|
||||
|
|
|
@ -591,6 +591,8 @@ struct sdhci_host {
|
|||
|
||||
enum sdhci_power_policy power_policy;
|
||||
|
||||
u32 auto_cmd_err_sts;
|
||||
|
||||
unsigned long private[0] ____cacheline_aligned;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue