Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Andy Shevchenko | b7026b0 | 2017-07-06 14:41:51 +0300 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2007 |
| 4 | * Stelian Pop <stelian@popies.net> |
| 5 | * Lead Tech Design <www.leadtechdesign.com> |
Andy Shevchenko | b7026b0 | 2017-07-06 14:41:51 +0300 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __ASM_X86_DMA_MAPPING_H |
| 8 | #define __ASM_X86_DMA_MAPPING_H |
| 9 | |
Masahiro Yamada | b27af39 | 2017-08-26 00:50:17 +0900 | [diff] [blame] | 10 | #include <linux/dma-direction.h> |
Andy Shevchenko | b7026b0 | 2017-07-06 14:41:51 +0300 | [diff] [blame] | 11 | |
Masahiro Yamada | b27af39 | 2017-08-26 00:50:17 +0900 | [diff] [blame] | 12 | #define dma_mapping_error(x, y) 0 |
Andy Shevchenko | b7026b0 | 2017-07-06 14:41:51 +0300 | [diff] [blame] | 13 | |
| 14 | static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) |
| 15 | { |
| 16 | *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len); |
| 17 | return (void *)*handle; |
| 18 | } |
| 19 | |
| 20 | static inline void dma_free_coherent(void *addr) |
| 21 | { |
| 22 | free(addr); |
| 23 | } |
| 24 | |
| 25 | static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, |
| 26 | enum dma_data_direction dir) |
| 27 | { |
| 28 | return (unsigned long)vaddr; |
| 29 | } |
| 30 | |
| 31 | static inline void dma_unmap_single(volatile void *vaddr, size_t len, |
| 32 | unsigned long paddr) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | #endif /* __ASM_X86_DMA_MAPPING_H */ |