aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2009-01-04 17:06:03 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2009-01-04 17:06:03 +0000
commitbcd4eff43a16ed339d4b17141d8828e9228b2d52 (patch)
tree5d58d531a98d824a884d91fdb77406067c7cb39a
parent8aaff459acdad4915bcdd8475d4314499980e0ac (diff)
fix-glamo-mci-ambiguous-timeout.patch
Sometimes we see failures with cards where the status is eg, 0x310. This corresponds to a "no data" timeout and an assertion that the data is present. This patch makes the data present status have priority over the timeout status. Signed-off-by: Andy Green <andy@openmoko.com>
-rw-r--r--drivers/mfd/glamo/glamo-mci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c
index 3e3ffeaff71..778e47c7427 100644
--- a/drivers/mfd/glamo/glamo-mci.c
+++ b/drivers/mfd/glamo/glamo-mci.c
@@ -361,6 +361,10 @@ static void glamo_mci_irq(unsigned int irq, struct irq_desc *desc)
writew(GLAMO_IRQ_MMC,
glamo_mci_def_pdata.pglamo->base + GLAMO_REG_IRQ_CLEAR);
+ /* we ignore a data timeout report if we are also told the data came */
+ if (status & GLAMO_STAT1_MMC_RB_DRDY)
+ status &= ~GLAMO_STAT1_MMC_DTOUT;
+
if (status & (GLAMO_STAT1_MMC_RTOUT |
GLAMO_STAT1_MMC_DTOUT))
cmd->error = -ETIMEDOUT;