1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2013 Andes Technology Corporation
4 * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com>
6 #ifndef __ASM_NDS_DMA_MAPPING_H
7 #define __ASM_NDS_DMA_MAPPING_H
10 #include <asm/cache.h>
12 #include <linux/dma-direction.h>
13 #include <linux/types.h>
16 static void *dma_alloc_coherent(size_t len, unsigned long *handle)
18 *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
19 return (void *)*handle;
22 #endif /* __ASM_NDS_DMA_MAPPING_H */