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