blob: 43073ad2524f63e7926672d97554e3c9d31d9cd5 [file] [log] [blame]
Andy Shevchenkob7026b02017-07-06 14:41:51 +03001/*
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 Yamadab27af392017-08-26 00:50:17 +090011#include <linux/dma-direction.h>
Andy Shevchenkob7026b02017-07-06 14:41:51 +030012
Masahiro Yamadab27af392017-08-26 00:50:17 +090013#define dma_mapping_error(x, y) 0
Andy Shevchenkob7026b02017-07-06 14:41:51 +030014
15static 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
21static inline void dma_free_coherent(void *addr)
22{
23 free(addr);
24}
25
26static 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
32static 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 */