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 <[email protected]>
---

 drivers/mfd/glamo/glamo-mci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c
index 3e3ffea..778e47c 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;


Reply via email to