Refresh patches Signed-off-by: Joshua Covington <joshuacov@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23703 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
31 lines
989 B
Diff
31 lines
989 B
Diff
From 372f4e66dad6347962120d455b18befa1622b7cc Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Mon, 17 Nov 2025 17:11:54 +0000
|
|
Subject: [PATCH] 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 <phil@raspberrypi.com>
|
|
---
|
|
kernel/dma/direct.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/kernel/dma/direct.h
|
|
+++ b/kernel/dma/direct.h
|
|
@@ -94,7 +94,7 @@ static inline dma_addr_t dma_direct_map_
|
|
}
|
|
|
|
if (attrs & DMA_ATTR_MMIO) {
|
|
- dma_addr = phys;
|
|
+ dma_addr = phys_to_dma(dev, phys);
|
|
if (unlikely(!dma_capable(dev, dma_addr, size, false)))
|
|
goto err_overflow;
|
|
} else {
|