diff options
author | Christoph Müllner <christoph.muellner@theobroma-systems.com> | 2019-05-04 16:31:03 +0200 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2019-08-11 11:28:39 +0200 |
commit | 112ff6947459229e8242f44f0089cf5f385f3432 (patch) | |
tree | b836940f553969bffbce1bf9eca3b074bcadb4e5 | |
parent | 17bd739cc9bf6fc8cf8ca00af5d7cdd329d06d71 (diff) |
px30: Add restriction for DMA-able addresses.
Patches on the U-Boot mailing list from Rockchip engineers
indicate, that the PX30's DMA engines are not able to use
addresses in high-memory (above 0xf8000000).
This patch models this restriction in an RK3368 specific
mach_addr_is_dmaable() function.
Signed-off-by: Christoph Müllner <christoph.muellner@theobroma-systems.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r-- | arch/arm/mach-rockchip/px30/px30.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c index 079f05c52a..87a7284d78 100644 --- a/arch/arm/mach-rockchip/px30/px30.c +++ b/arch/arm/mach-rockchip/px30/px30.c @@ -241,3 +241,18 @@ void board_debug_uart_init(void) #endif } #endif + +int mach_addr_is_dmaable(void __iomem *ptr) +{ + uintptr_t addr = (uintptr_t)ptr; + + /* + * The PX30 cannot cope with high-memory DMA target/sources. + */ + if (addr < 0xf8000000UL) { + return 1; + } + + debug("Not DMA-able: 0x%lx\n", addr); + return 0; +} |