summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@theobroma-systems.com>2019-05-04 16:22:49 +0200
committerHeiko Stuebner <heiko@sntech.de>2019-08-11 11:26:41 +0200
commit67db918f97fc48ab0ee40301376dea60729bebc5 (patch)
treeb9aa00a492871d23af43c82617dbfc1b0260ba87
parent4e32676984db6fa20c982937b196658b0cea9613 (diff)
board_f: Add mach specific DMA address check function.
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@theobroma-systems.com>
-rw-r--r--common/board_f.c5
-rw-r--r--include/init.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 4760d728f3..75a208019e 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;