blob: b353ff0bef5926ec382c726ec422537fa3325ca2 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Andy Shevchenkob7026b02017-07-06 14:41:51 +03002/*
3 * (C) Copyright 2007
4 * Stelian Pop <stelian@popies.net>
5 * Lead Tech Design <www.leadtechdesign.com>
Andy Shevchenkob7026b02017-07-06 14:41:51 +03006 */
7#ifndef __ASM_X86_DMA_MAPPING_H
8#define __ASM_X86_DMA_MAPPING_H
9
Masahiro Yamadab27af392017-08-26 00:50:17 +090010#include <linux/dma-direction.h>
Andy Shevchenkob7026b02017-07-06 14:41:51 +030011
Masahiro Yamadab27af392017-08-26 00:50:17 +090012#define dma_mapping_error(x, y) 0
Andy Shevchenkob7026b02017-07-06 14:41:51 +030013
14static 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
20static inline void dma_free_coherent(void *addr)
21{
22 free(addr);
23}
24
25static 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
31static 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 */