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>
This commit is contained in:
committed by
Pierre Ossman
parent
8114634ccb
commit
3e3bf20756
@@ -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
|
||||
|
Reference in New Issue
Block a user