Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
ken kuo | 9f128bc | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Andes Technology Corporation |
| 4 | * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com> |
ken kuo | 9f128bc | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 5 | */ |
| 6 | #ifndef __ASM_NDS_DMA_MAPPING_H |
| 7 | #define __ASM_NDS_DMA_MAPPING_H |
| 8 | |
Masahiro Yamada | b27af39 | 2017-08-26 00:50:17 +0900 | [diff] [blame] | 9 | #include <linux/dma-direction.h> |
ken kuo | 9f128bc | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 10 | |
| 11 | static void *dma_alloc_coherent(size_t len, unsigned long *handle) |
| 12 | { |
| 13 | *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len); |
| 14 | return (void *)*handle; |
| 15 | } |
| 16 | |
| 17 | static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, |
| 18 | enum dma_data_direction dir) |
| 19 | { |
| 20 | return (unsigned long)vaddr; |
| 21 | } |
| 22 | |
| 23 | static inline void dma_unmap_single(volatile void *vaddr, size_t len, |
| 24 | unsigned long paddr) |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | #endif /* __ASM_NDS_DMA_MAPPING_H */ |