From: Christoph Müllner <christoph.muell...@theobroma-systems.com>

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 <christoph.muell...@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com>
---

Changes in v2: None

 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 7ef20f2042..92dc34d2d8 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 afc953d51e..1653d5086f 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;
 
-- 
2.11.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to