From fa95d28c23e832f70d2630ccba630d5238e51587 Mon Sep 17 00:00:00 2001 From: Madhusudhan Chikkature Date: Fri, 25 Jul 2008 16:02:19 +0530 Subject: [PATCH] HSMMC driver fix for core ret ARM: OMAP3: HSMMC fix for core ret. The core ret seem to be prevented by HSMMC CTO errors. This patch provides a fix for the same. Signed-off-by: Madhusudhan Chikkature Signed-off-by: Tony Lindgren --- drivers/mmc/host/omap_hsmmc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4dfa8ddeb0d..c2073940614 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -84,6 +84,7 @@ #define STAT_CLEAR 0xFFFFFFFF #define INIT_STREAM_CMD 0x00000000 #define DUAL_VOLT_OCR_BIT 7 +#define SRC (1 << 25) #define OMAP_MMC1_DEVID 1 #define OMAP_MMC2_DEVID 2 @@ -315,10 +316,16 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) if ((status & CMD_TIMEOUT) || (status & CMD_CRC)) { if (host->cmd) { - if (status & CMD_TIMEOUT) + if (status & CMD_TIMEOUT) { + OMAP_HSMMC_WRITE(host->base, SYSCTL, + OMAP_HSMMC_READ(host->base, + SYSCTL) | SRC); + while (OMAP_HSMMC_READ(host->base, + SYSCTL) & SRC) ; host->cmd->error = -ETIMEDOUT; - else + } else { host->cmd->error = -EILSEQ; + } end_cmd = 1; } if (host->data) -- 2.41.1