WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 515f4d9

Browse files
pelwellpopcornmix
authored andcommitted
dma-mapping: Use any dma_range_map for phys to DMA
Device Tree properties ranges and dma-ranges describe address mappings required when moving between buses. Ensure this translation happens when mapping MMIO addresses for DMA accesses. This commit replaces another downstream commit that no longer applies as of 6.18: dma-direct: take dma-ranges/offsets into account in resource mapping Signed-off-by: Phil Elwell <[email protected]>
1 parent a9eb03d commit 515f4d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/dma/direct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static inline dma_addr_t dma_direct_map_phys(struct device *dev,
9494
}
9595

9696
if (attrs & DMA_ATTR_MMIO) {
97-
dma_addr = phys;
97+
dma_addr = phys_to_dma(dev, phys);
9898
if (unlikely(!dma_capable(dev, dma_addr, size, false)))
9999
goto err_overflow;
100100
} else {

0 commit comments

Comments
 (0)