public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] board_f: Add mach specific DMA address check function.
@ 2019-05-07  9:05 Christoph Muellner
  2019-05-07  9:05 ` [U-Boot] [PATCH 2/3] bouncebuf: Add DMA validation check to addr_aligned() Christoph Muellner
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Christoph Muellner @ 2019-05-07  9:05 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>
---

 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

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

end of thread, other threads:[~2019-08-22 23:12 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-07  9:05 [U-Boot] [PATCH 1/3] board_f: Add mach specific DMA address check function Christoph Muellner
2019-05-07  9:05 ` [U-Boot] [PATCH 2/3] bouncebuf: Add DMA validation check to addr_aligned() Christoph Muellner
2019-05-07 13:05   ` Marek Vasut
2019-05-07 13:48     ` Christoph Müllner
2019-05-07 13:52       ` Christoph Müllner
2019-05-07 13:53         ` Marek Vasut
2019-05-07 14:01           ` Christoph Müllner
2019-05-07 15:04             ` Marek Vasut
2019-05-07 15:22               ` Christoph Müllner
2019-05-07 15:56                 ` Marek Vasut
2019-05-07 16:02                   ` Christoph Müllner
2019-05-18 16:08   ` Simon Glass
2019-06-04  3:23     ` [U-Boot] [PATCH 2/3] bouncebuf: Add DMA validation check to addr_aligned().【请注意,邮件由u-boot-bounces@lists.denx.de代发】 addr_aligned() Kever Yang
2019-07-04 20:43       ` Heiko Stübner
2019-07-06 17:16         ` Simon Glass
2019-07-06 18:04           ` Heiko Stuebner
2019-08-22 23:12             ` Heiko Stuebner
2019-05-07  9:05 ` [U-Boot] [PATCH 3/3] rk3399: Add restriction for DMA-able addresses Christoph Muellner
2019-06-04  3:07   ` Kever Yang
2019-06-04  3:09 ` [U-Boot] [PATCH 1/3] board_f: Add mach specific DMA address check function Kever Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox