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