1 /*
2  * (C) Copyright 2007
3  * Stelian Pop <stelian@popies.net>
4  * Lead Tech Design <www.leadtechdesign.com>
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 #ifndef __ASM_ARM_DMA_MAPPING_H
9 #define __ASM_ARM_DMA_MAPPING_H
10 
11 #include <linux/dma-direction.h>
12 
13 #define	dma_mapping_error(x, y)	0
14 
15 static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
16 {
17 	*handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
18 	return (void *)*handle;
19 }
20 
21 static inline void dma_free_coherent(void *addr)
22 {
23 	free(addr);
24 }
25 
26 static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
27 					   enum dma_data_direction dir)
28 {
29 	return (unsigned long)vaddr;
30 }
31 
32 static inline void dma_unmap_single(volatile void *vaddr, size_t len,
33 				    unsigned long paddr)
34 {
35 }
36 
37 #endif /* __ASM_ARM_DMA_MAPPING_H */
38