diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-17 16:38:21 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-21 10:34:04 +0100 |
commit | 9f7cbfaa0d0bed3bbe9f72a739141e32339ce5f8 (patch) | |
tree | b904f2077042e224113e7cbf4450423bd5195ac8 /arch/arm/cpu/mmu.c | |
parent | bf7bf45c1e972b693c884017f5ffdad0e1e83c60 (diff) | |
download | barebox-9f7cbfaa0d0bed3bbe9f72a739141e32339ce5f8.tar.gz barebox-9f7cbfaa0d0bed3bbe9f72a739141e32339ce5f8.tar.xz |
ARM: mmu: Share code for dma_free_coherent()
Now that AArch64 version is calling arch_remap_range() it is identical
to ARM version in mmu.c. Move the definition to mmu-common.c to avoid
duplication.
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.c')
-rw-r--r-- | arch/arm/cpu/mmu.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index f134e8bb38..70ab5ebb5b 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -527,14 +527,6 @@ void *dma_alloc_writecombine(size_t size, dma_addr_t *dma_handle) return dma_alloc_map(size, dma_handle, ARCH_MAP_WRITECOMBINE); } -void dma_free_coherent(void *mem, dma_addr_t dma_handle, size_t size) -{ - size = PAGE_ALIGN(size); - arch_remap_range(mem, size, MAP_CACHED); - - free(mem); -} - void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir) { |