blob: f8668f1fe5dba67105efded4cd6a6f18ea155626 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
ken kuo6e56e4a2013-08-06 01:00:53 +08002/*
3 * Copyright (C) 2013 Andes Technology Corporation
4 * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com>
ken kuo6e56e4a2013-08-06 01:00:53 +08005 */
6#ifndef __ASM_NDS_DMA_MAPPING_H
7#define __ASM_NDS_DMA_MAPPING_H
8
Vignesh Raghavendra4a81a212020-01-16 14:23:45 +05309#include <common.h>
10#include <asm/cache.h>
11#include <cpu_func.h>
Masahiro Yamadaef205ea2017-08-26 00:50:17 +090012#include <linux/dma-direction.h>
Masahiro Yamada7167d672020-02-14 16:40:17 +090013#include <linux/types.h>
Vignesh Raghavendra4a81a212020-01-16 14:23:45 +053014#include <malloc.h>
ken kuo6e56e4a2013-08-06 01:00:53 +080015
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
ken kuo6e56e4a2013-08-06 01:00:53 +080022#endif /* __ASM_NDS_DMA_MAPPING_H */