Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
ken kuo | 6e56e4a | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Andes Technology Corporation |
| 4 | * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com> |
ken kuo | 6e56e4a | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 5 | */ |
| 6 | #ifndef __ASM_NDS_DMA_MAPPING_H |
| 7 | #define __ASM_NDS_DMA_MAPPING_H |
| 8 | |
Vignesh Raghavendra | 4a81a21 | 2020-01-16 14:23:45 +0530 | [diff] [blame] | 9 | #include <common.h> |
| 10 | #include <asm/cache.h> |
| 11 | #include <cpu_func.h> |
Masahiro Yamada | ef205ea | 2017-08-26 00:50:17 +0900 | [diff] [blame] | 12 | #include <linux/dma-direction.h> |
Masahiro Yamada | 7167d67 | 2020-02-14 16:40:17 +0900 | [diff] [blame] | 13 | #include <linux/types.h> |
Vignesh Raghavendra | 4a81a21 | 2020-01-16 14:23:45 +0530 | [diff] [blame] | 14 | #include <malloc.h> |
ken kuo | 6e56e4a | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 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 | |
ken kuo | 6e56e4a | 2013-08-06 01:00:53 +0800 | [diff] [blame] | 22 | #endif /* __ASM_NDS_DMA_MAPPING_H */ |