summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-05-20 11:33:25 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-21 11:45:48 +0200
commitaf5b2e70c43f0dffbbabbcdb179624c5497eb5e4 (patch)
tree4c1d40517908e2441972a1038ce9e486b92d19ff
parentfc9304b7f77367ed603198bd50e26b57c170641f (diff)
downloadbarebox-af5b2e70c43f0dffbbabbcdb179624c5497eb5e4.tar.gz
ARM: include: dma: Zero out DMA coherent memory in no-MMU case
Add code to match the behavior of dma_alloc_coherent() when CONFIG_MMU is selected. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/include/asm/dma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index bb7e62a..15999a5 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -20,6 +20,8 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle)
if (dma_handle)
*dma_handle = (dma_addr_t)ret;
+ memset(ret, 0, size);
+
return ret;
}