diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-17 16:38:27 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-21 10:34:06 +0100 |
commit | 7179471fd7651e8ddd7758d2c3c94928421e5493 (patch) | |
tree | 3782d9e0de5e91a686ba636a3cd4a6eec31b8124 /arch/arm/cpu/mmu-common.h | |
parent | 3e0c800c9b38b6e1eece0e4730919d1f8af09f36 (diff) | |
download | barebox-7179471fd7651e8ddd7758d2c3c94928421e5493.tar.gz barebox-7179471fd7651e8ddd7758d2c3c94928421e5493.tar.xz |
ARM: mmu: Make sure DMA coherent memory is zeroed out
In order to avoid passing random/junky values to DMA/HW as well as to
allow simplifying memory initialization in individual drivers, change
dma_alloc_coherent() to guarantee that memory it returns is properly
zeroed out.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/mmu-common.h')
-rw-r--r-- | arch/arm/cpu/mmu-common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/cpu/mmu-common.h b/arch/arm/cpu/mmu-common.h index 679799c3c5..0a33b138e1 100644 --- a/arch/arm/cpu/mmu-common.h +++ b/arch/arm/cpu/mmu-common.h @@ -2,6 +2,7 @@ #define __ARM_MMU_COMMON_H void dma_inv_range(void *ptr, size_t size); +void dma_flush_range(void *ptr, size_t size); void *dma_alloc_map(size_t size, dma_addr_t *dma_handle, unsigned flags); void __mmu_init(bool mmu_on); |