1 /*
2  * Copyright (C) 2013 Andes Technology Corporation
3  * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 #ifndef __ASM_NDS_DMA_MAPPING_H
8 #define __ASM_NDS_DMA_MAPPING_H
9 
10 #include <linux/dma-direction.h>
11 
12 static void *dma_alloc_coherent(size_t len, unsigned long *handle)
13 {
14 	*handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
15 	return (void *)*handle;
16 }
17 
18 static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
19 					   enum dma_data_direction dir)
20 {
21 	return (unsigned long)vaddr;
22 }
23 
24 static inline void dma_unmap_single(volatile void *vaddr, size_t len,
25 				    unsigned long paddr)
26 {
27 }
28 
29 #endif /* __ASM_NDS_DMA_MAPPING_H */
30