All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/3] board_f: Add mach specific DMA address check function.
@ 2019-05-07 15:59 Christoph Muellner
  2019-05-07 15:59 ` [U-Boot] [PATCH v2 2/3] bouncebuf: Add DMA validation check to addr_aligned() Christoph Muellner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Christoph Muellner @ 2019-05-07 15:59 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-23  8:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 15:59 [U-Boot] [PATCH v2 1/3] board_f: Add mach specific DMA address check function Christoph Muellner
2019-05-07 15:59 ` [U-Boot] [PATCH v2 2/3] bouncebuf: Add DMA validation check to addr_aligned() Christoph Muellner
2019-05-07 15:59 ` [U-Boot] [PATCH v2 3/3] rk3399: Add restriction for DMA-able addresses Christoph Muellner
2019-05-18 16:08 ` [U-Boot] [PATCH v2 1/3] board_f: Add mach specific DMA address check function Simon Glass
2019-05-22 11:29   ` Heiko Stuebner
2019-05-22 22:57     ` Simon Glass
2019-05-23  8:53       ` Christoph Müllner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.