summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorAnton Vorontsov2009-03-16 22:14:00 +0100
committerPierre Ossman2009-03-24 21:30:10 +0100
commit3e3bf20756aeee57a40fd37b923263c9a51b8c68 (patch)
tree9cf64169c61208b59a1a6c16e0bfc48b45a1c7a7 /drivers/mmc/host/sdhci.c
parentsdhci: Add set_clock callback and a quirk for nonstandard clocks (diff)
downloadkernel-qcow2-linux-3e3bf20756aeee57a40fd37b923263c9a51b8c68.tar.gz
kernel-qcow2-linux-3e3bf20756aeee57a40fd37b923263c9a51b8c68.tar.xz
kernel-qcow2-linux-3e3bf20756aeee57a40fd37b923263c9a51b8c68.zip
sdhci: Add quirk for controllers that need small delays for PIO
Small udelay is needed to make eSDHC work in PIO mode. Without the delay reading causes endless interrupt storm, and writing corrupts data. The first guess would be that we must wait for some bit in some register, but I didn't find any reliable bits that change before and after the delay. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 75d0ecbce10c..cd6dab34ba54 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -336,6 +336,9 @@ static void sdhci_transfer_pio(struct sdhci_host *host)
mask = ~0;
while (sdhci_readl(host, SDHCI_PRESENT_STATE) & mask) {
+ if (host->quirks & SDHCI_QUIRK_PIO_NEEDS_DELAY)
+ udelay(100);
+
if (host->data->flags & MMC_DATA_READ)
sdhci_read_block_pio(host);
else