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