Merge branch '2022-04-25-initial-implementation-of-stdboot'
[platform/kernel/u-boot.git] / arch / nds32 / include / asm / dma-mapping.h
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
16 static 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 */