* [PATCH] mmc: sdhci: skip cache invalidation if DMA is not used
@ 2021-01-14 5:46 Yuezhang.Mo at sony.com
2021-01-15 1:09 ` Andy.Wu
0 siblings, 1 reply; 2+ messages in thread
From: Yuezhang.Mo at sony.com @ 2021-01-14 5:46 UTC (permalink / raw)
To: u-boot
If DMA(SDMA or ADMA) is not used, the cache invalidation
after reading is no need, should be skipped. Otherwise
U-Boot may hang at the cache invalidation.
Found this issue and tested this fix on DragonBoard 410c.
Fixes: commit 4155ad9aac94 ("mmc: sdhci: fix missing cache invalidation after reading by DMA")
Signed-off-by: Yuezhang.Mo <Yuezhang.Mo@sony.com>
---
drivers/mmc/sdhci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 0628934312..29099199a7 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -174,8 +174,10 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)
}
} while (!(stat & SDHCI_INT_DATA_END));
+#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
dma_unmap_single(host->start_addr, data->blocks * data->blocksize,
mmc_get_dma_dir(data));
+#endif
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-15 1:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14 5:46 [PATCH] mmc: sdhci: skip cache invalidation if DMA is not used Yuezhang.Mo at sony.com
2021-01-15 1:09 ` Andy.Wu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.