Commit 19a2aa9
committed
dma-mapping: MMIO mappings still need phys_to_dma
The new concept of MMIO DMA addresses is used to indicate things with
fixed addresses - hardware registers, not movable pages. As such it is
reasonable to bypass the SWIOTLB mapping logic, but not any CPU<->DMA
address translation that has been configured by Device Tree. Doing so
will break any drives using (possibly indirectly) dma_map_resource
for register addresses where ther is a non-identity mapping between
CPU and DMA addresses. A good example of this is the SDHOST MMC
interface on BCM283x SoCs.
Fix the bug by reinstating the phys_to_dma call in the MMIO code path.
N.B. The upstream SDHOST driver (drivers/mmc/host/bcm2835.c) is not
affected by this bug because it pulls bus/DMA addresses directly out
of Device Tree.
See: #7136
Fixes: e53d29f ("dma-mapping: convert dma_direct_*map_page to be phys_addr_t based")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>1 parent 671d4ea commit 19a2aa9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
0 commit comments