diff options
author | Yuezhang.Mo@sony.com <Yuezhang.Mo@sony.com> | 2021-01-14 05:46:50 +0000 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2021-02-19 15:03:25 +0800 |
commit | 37e1362efc2ba9be5355b3c55f9f4f7a43f02de2 (patch) | |
tree | f84f4b5d832773e369a815bb26b3c45fa277d5d7 /drivers/mmc | |
parent | 1019b19665ee719762f7613a36bf1b7ef9c3b578 (diff) | |
download | u-boot-37e1362efc2ba9be5355b3c55f9f4f7a43f02de2.zip u-boot-37e1362efc2ba9be5355b3c55f9f4f7a43f02de2.tar.gz u-boot-37e1362efc2ba9be5355b3c55f9f4f7a43f02de2.tar.bz2 |
mmc: sdhci: skip cache invalidation if DMA is not used
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>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/sdhci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 5f18d47..d9ab6a0 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -177,8 +177,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; } |