if TC interrupt bit is set but DMA interrupt bit is clear, read status register
again in case DMA interrupt will come in next time cycle
Signed-off-by: Tony Lin <tony.lin@freescale.com>
val |= SDHCI_CARD_PRESENT;
}
+ if (reg == SDHCI_INT_STATUS && cpu_is_mx6q())
+ /*
+ * on mx6q, there is low possibility that
+ * DATA END interrupt comes ealier than DMA
+ * END interrupt which is conflict with standard
+ * host controller spec. In this case, read the
+ * status register again will workaround this issue.
+ */
+ if ((val & SDHCI_INT_DATA_END) && \
+ !(val & SDHCI_INT_DMA_END))
+ val = readl(host->ioaddr + reg);
return val;
}