1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Stelian Pop <stelian@popies.net>
5 * Lead Tech Design <www.leadtechdesign.com>
7 #ifndef __ASM_ARM_DMA_MAPPING_H
8 #define __ASM_ARM_DMA_MAPPING_H
10 #include <asm/cache.h>
12 #include <linux/dma-direction.h>
13 #include <linux/kernel.h>
14 #include <linux/types.h>
17 static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
19 *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, ROUND(len, ARCH_DMA_MINALIGN));
20 return (void *)*handle;
23 static inline void dma_free_coherent(void *addr)
28 #endif /* __ASM_ARM_DMA_MAPPING_H */