2 * Copyright (C) 2013 Andes Technology Corporation
3 * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com>
5 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef __ASM_NDS_DMA_MAPPING_H
8 #define __ASM_NDS_DMA_MAPPING_H
10 #include <linux/dma-direction.h>
12 static void *dma_alloc_coherent(size_t len, unsigned long *handle)
14 *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
15 return (void *)*handle;
18 static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
19 enum dma_data_direction dir)
21 return (unsigned long)vaddr;
24 static inline void dma_unmap_single(volatile void *vaddr, size_t len,
29 #endif /* __ASM_NDS_DMA_MAPPING_H */