[U-Boot] [PATCH 1/3] board_f: Add mach specific DMA address check function.

Christoph Muellner christoph.muellner at theobroma-systems.com
Tue May 7 09:05:29 UTC 2019


From: Christoph Müllner <christoph.muellner at 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.muellner at theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner at theobroma-systems.com>
---

 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..fed3c24373 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(unsigned long addr)
+{
+	return 1;
+}
diff --git a/include/init.h b/include/init.h
index afc953d51e..18210a1489 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(unsigned long addr);
+
 /* common/init/board_init.c */
 extern ulong monitor_flash_len;
 
-- 
2.11.0



More information about the U-Boot mailing list