]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/nds32/include/asm/dma-mapping.h
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / nds32 / include / asm / dma-mapping.h
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 enum dma_data_direction {
11         DMA_BIDIRECTIONAL       = 0,
12         DMA_TO_DEVICE           = 1,
13         DMA_FROM_DEVICE         = 2,
14 };
15
16 static void *dma_alloc_coherent(size_t len, unsigned long *handle)
17 {
18         *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
19         return (void *)*handle;
20 }
21
22 static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
23                                            enum dma_data_direction dir)
24 {
25         return (unsigned long)vaddr;
26 }
27
28 static inline void dma_unmap_single(volatile void *vaddr, size_t len,
29                                     unsigned long paddr)
30 {
31 }
32
33 #endif /* __ASM_NDS_DMA_MAPPING_H */