blob: 287466800e4bfd4f1793e8a59d22ef65c86fbd8b [file] [log] [blame]
Stelian Pop7d42a222008-01-31 21:15:53 +00001/*
2 * (C) Copyright 2007
Stelian Pop5ee0c7f2011-11-01 00:00:39 +01003 * Stelian Pop <stelian@popies.net>
Stelian Pop7d42a222008-01-31 21:15:53 +00004 * Lead Tech Design <www.leadtechdesign.com>
5 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Stelian Pop7d42a222008-01-31 21:15:53 +00007 */
8#ifndef __ASM_ARM_DMA_MAPPING_H
9#define __ASM_ARM_DMA_MAPPING_H
10
Masahiro Yamadaef205ea2017-08-26 00:50:17 +090011#include <linux/dma-direction.h>
Kishon Vijay Abraham Icec6d1c2015-02-23 18:39:56 +053012
Masahiro Yamadaef205ea2017-08-26 00:50:17 +090013#define dma_mapping_error(x, y) 0
Stelian Pop7d42a222008-01-31 21:15:53 +000014
Kishon Vijay Abraham I14841502015-02-23 18:39:49 +053015static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
Stelian Pop7d42a222008-01-31 21:15:53 +000016{
Kuo-Jung Su9491ec02013-07-29 13:51:43 +080017 *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
Stelian Pop7d42a222008-01-31 21:15:53 +000018 return (void *)*handle;
19}
20
Kishon Vijay Abraham Icec6d1c2015-02-23 18:39:56 +053021static inline void dma_free_coherent(void *addr)
22{
23 free(addr);
24}
25
Stelian Pop7d42a222008-01-31 21:15:53 +000026static 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_ARM_DMA_MAPPING_H */