From: Madhusudhan Chikkature Date: Fri, 25 Jul 2008 10:32:19 +0000 (+0530) Subject: HSMMC driver fix for core ret X-Git-Tag: v2.6.26-omap1~18 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fa95d28c23e832f70d2630ccba630d5238e51587;p=linux-2.6-omap-h63xx.git 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 --- 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)