blob: 25e5a1b6ec8a253803dd42bed8abd0bc6b3570e2 [file] [log] [blame]
ken kuo6e56e4a2013-08-06 01:00:53 +08001/*
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
10enum dma_data_direction {
11 DMA_BIDIRECTIONAL = 0,
12 DMA_TO_DEVICE = 1,
13 DMA_FROM_DEVICE = 2,
14};
15
16static 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
22static 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
28static 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 */