blob: a627306ed852306fa0ffad8d9ff1c2f5001489ac [file] [log] [blame]
ken kuo6e56e4a2013-08-06 01:00:53 +08001/*
2 * Copyright (C) 2013 Andes Technology Corporation
3 * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7#ifndef __ASM_NDS_DMA_MAPPING_H
8#define __ASM_NDS_DMA_MAPPING_H
9
Masahiro Yamadaef205ea2017-08-26 00:50:17 +090010#include <linux/dma-direction.h>
ken kuo6e56e4a2013-08-06 01:00:53 +080011
12static void *dma_alloc_coherent(size_t len, unsigned long *handle)
13{
14 *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
15 return (void *)*handle;
16}
17
18static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
19 enum dma_data_direction dir)
20{
21 return (unsigned long)vaddr;
22}
23
24static inline void dma_unmap_single(volatile void *vaddr, size_t len,
25 unsigned long paddr)
26{
27}
28
29#endif /* __ASM_NDS_DMA_MAPPING_H */