diff options
author | Nitin Garg <nitin.garg@freescale.com> | 2012-05-22 10:12:51 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2012-05-22 10:18:22 -0500 |
commit | 25783cc52f20cfc60512a3f3e0a7d447cfaf6ef5 (patch) | |
tree | d65194d9887404655c9010878a93c389d845e195 | |
parent | 29bb9e00efcfc3d0bbf0ac4d3fe21fcb3f0b5716 (diff) |
ENGR00209240: Kernel panic and system crash if plug out extsd card and plug in
In the cd_irq, we are resetting the SDHC controller but not
resetting the card. As per specification, if host driver resets the
controller, it should reset the card too. Removed the host reset
from cd_irq and enable multi-block transfer using ACMD23 instead of
ACMD12.
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 465938e7ba2f..f427c7ba5d38 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -442,8 +442,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) return; case SDHCI_COMMAND: - if ((host->cmd->opcode == MMC_STOP_TRANSMISSION) - && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) + if ((host->cmd->opcode == MMC_STOP_TRANSMISSION || + host->cmd->opcode == MMC_SET_BLOCK_COUNT) && + (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) val |= SDHCI_CMD_ABORTCMD; writel(0x08800880, host->ioaddr + SDHCI_CAPABILITIES_1); @@ -665,9 +666,6 @@ static irqreturn_t cd_irq(int irq, void *data) imx_data->scratchpad &= ~SDHCI_MIX_CTRL_SMPCLK_SEL; } - esdhc_reset(sdhost); - mdelay(1); - tasklet_schedule(&sdhost->card_tasklet); return IRQ_HANDLED; }; @@ -708,11 +706,6 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd if (cpu_is_mx6()) host->quirks2 |= SDHCI_QUIRK_BROKEN_AUTO_CMD23; - if(cpu_is_mx53()) { - host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12; - host->quirks2 |= SDHCI_QUIRK_BROKEN_AUTO_CMD23; - } - /* write_protect can't be routed to controller, use gpio */ sdhci_esdhc_ops.get_ro = esdhc_pltfm_get_ro; |