diff options
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 5f95e10229b5..be09739f692d 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -278,6 +278,15 @@ static void sdhci_transfer_pio(struct sdhci_host *host) | |||
278 | else | 278 | else |
279 | mask = SDHCI_SPACE_AVAILABLE; | 279 | mask = SDHCI_SPACE_AVAILABLE; |
280 | 280 | ||
281 | /* | ||
282 | * Some controllers (JMicron JMB38x) mess up the buffer bits | ||
283 | * for transfers < 4 bytes. As long as it is just one block, | ||
284 | * we can ignore the bits. | ||
285 | */ | ||
286 | if ((host->quirks & SDHCI_QUIRK_BROKEN_SMALL_PIO) && | ||
287 | (host->data->blocks == 1)) | ||
288 | mask = ~0; | ||
289 | |||
281 | while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { | 290 | while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { |
282 | if (host->data->flags & MMC_DATA_READ) | 291 | if (host->data->flags & MMC_DATA_READ) |
283 | sdhci_read_block_pio(host); | 292 | sdhci_read_block_pio(host); |