]> git.baikalelectronics.ru Git - uboot.git/commit
mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 14 Feb 2020 07:40:26 +0000 (16:40 +0900)
committerPeng Fan <peng.fan@nxp.com>
Thu, 20 Feb 2020 07:09:57 +0000 (15:09 +0800)
commit335e8cca55bc5226b4f6019956985b35a2131237
tree14493161aee3ee512b98effd23fdc982d3f98891
parentcf1067e5a3a422505a6096f9f2d539911cf9af98
mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA

Currently, sdhci_prepare_dma() calls flush_cache() regardless of the
DMA direction.

Actually, cache invalidation is enough when reading data from the device.

This is correctly handled by dma_map_single(), which mimics the DMA-API
in Linux kernel. Drivers can be agnostic which cache operation occurs
behind the scene.

This commit also sanitizes the difference between the virtual address
and the dma address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mmc/sdhci.c