diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-17 16:38:23 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-21 10:34:06 +0100 |
commit | 82ad5896fbbb51593e94b9b891509683acf94341 (patch) | |
tree | 3560016b4b82ade823b7b4e0b87f71bf1e2c251c /arch/arm/cpu/mmu-common.h | |
parent | 581a73db8cae2b9e770c61ddb9cb0f27fdd2c423 (diff) | |
download | barebox-82ad5896fbbb51593e94b9b891509683acf94341.tar.gz barebox-82ad5896fbbb51593e94b9b891509683acf94341.tar.xz |
ARM: mmu: Share code for dma_alloc_coherent()
Both ARM and ARM64 implement almost identical algorithms in
dma_alloc_coherent(). Move the code to mmu-common.c, so it can be
shared.
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/mmu-common.h b/arch/arm/cpu/mmu-common.h new file mode 100644 index 0000000000..e8689ac310 --- /dev/null +++ b/arch/arm/cpu/mmu-common.h @@ -0,0 +1,7 @@ +#ifndef __ARM_MMU_COMMON_H +#define __ARM_MMU_COMMON_H + +void dma_inv_range(void *ptr, size_t size); +void *dma_alloc_map(size_t size, dma_addr_t *dma_handle, unsigned flags); + +#endif
\ No newline at end of file |