From 67db918f97fc48ab0ee40301376dea60729bebc5 Mon Sep 17 00:00:00 2001 From: Christoph Müllner Date: Sat, 4 May 2019 16:22:49 +0200 Subject: board_f: Add mach specific DMA address check function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some machines have limited DMA engines, which cannot deal with arbitrary addresses. This patch introduces a function to model these restrictions on a machine level. Signed-off-by: Christoph Müllner --- common/board_f.c | 5 +++++ include/init.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index 4760d728f37..75a208019e4 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1053,3 +1053,8 @@ void board_init_f_r(void) hang(); } #endif /* CONFIG_X86 */ + +__weak int mach_addr_is_dmaable(void __iomem *ptr) +{ + return 1; +} diff --git a/include/init.h b/include/init.h index afc953d51e2..1653d5086f8 100644 --- a/include/init.h +++ b/include/init.h @@ -125,6 +125,8 @@ int misc_init_f(void); int embedded_dtb_select(void); #endif +int mach_addr_is_dmaable(void __iomem *ptr); + /* common/init/board_init.c */ extern ulong monitor_flash_len; -- cgit v1.2.3