]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
HSMMC driver fix for core ret
authorMadhusudhan Chikkature <madhu.cr@ti.com>
Fri, 25 Jul 2008 10:32:19 +0000 (16:02 +0530)
committerTony Lindgren <tony@atomide.com>
Tue, 5 Aug 2008 14:01:37 +0000 (17:01 +0300)
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<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mmc/host/omap_hsmmc.c

index 4dfa8ddeb0db52453c7cf837435aa0177f225a9c..c207394061401ea81cdb58875d74e4e135d34582 100644 (file)
@@ -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)