Patches on the U-Boot mailing list from Rockchip engineers
indicate, that the RK3399's DMA engines are not able to use
addresses in high-memory (above 0xf8000000).

This patch models this restriction in an RK3399 specific
mach_addr_is_dmaable() function.

Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com>
---

 arch/arm/mach-rockchip/rk3399/rk3399.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c 
b/arch/arm/mach-rockchip/rk3399/rk3399.c
index a7ccd4f3ed..15b03726eb 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -109,3 +109,14 @@ void board_debug_uart_init(void)
 #endif
 }
 #endif
+
+int mach_addr_is_dmaable(unsigned long addr)
+{
+       /*
+        * The RK3399 cannot cope with high-memory DMA target/sources.
+        */
+       if (addr < 0xf8000000UL)
+               return 1;
+
+       return 0;
+}
-- 
2.11.0

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

Reply via email to