diff options
Diffstat (limited to 'arch/kvx/include/asm/dma.h')
-rw-r--r-- | arch/kvx/include/asm/dma.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/kvx/include/asm/dma.h b/arch/kvx/include/asm/dma.h new file mode 100644 index 0000000000..f1b54afe25 --- /dev/null +++ b/arch/kvx/include/asm/dma.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* SPDX-FileCopyrightText: 2021 Yann Sionneau <ysionneau@kalray.eu>, Kalray Inc. */ + +#ifndef __ASM_DMA_H +#define __ASM_DMA_H + +#include <linux/types.h> +#include <linux/build_bug.h> +#include <malloc.h> + +#define DMA_ALIGNMENT 64 + +#define dma_alloc_coherent dma_alloc_coherent +static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) +{ + BUILD_BUG_ON_MSG(1, "dma_alloc_coherent not supported: " + "MMU support is required to map uncached pages"); + return NULL; +} + +#define dma_free_coherent dma_free_coherent +static inline void dma_free_coherent(void *mem, dma_addr_t dma_handle, + size_t size) +{ + free(mem); +} + +#endif /* __ASM_DMA_H */ |