blob: 7b3c6f280293aeb5cdd13b1de341f0e74f36bf2d [file] [log] [blame]
Ley Foon Tane23c6212014-11-06 15:19:53 +08001/*
2 * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
3 * Copyright (C) 2009 Wind River Systems Inc
4 *
5 * This file is subject to the terms and conditions of the GNU General
6 * Public License. See the file COPYING in the main directory of this
7 * archive for more details.
8 */
9
10#ifndef _ASM_NIOS2_DMA_MAPPING_H
11#define _ASM_NIOS2_DMA_MAPPING_H
12
Bart Van Assche52997092017-01-20 13:04:01 -080013extern const struct dma_map_ops nios2_dma_ops;
Ley Foon Tane23c6212014-11-06 15:19:53 +080014
Bart Van Assche815dd182017-01-20 13:04:04 -080015static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
Ley Foon Tane23c6212014-11-06 15:19:53 +080016{
Christoph Hellwig5a1a67f2016-01-20 15:01:41 -080017 return &nios2_dma_ops;
Ley Foon Tane23c6212014-11-06 15:19:53 +080018}
19
20/*
Christoph Hellwig5a1a67f2016-01-20 15:01:41 -080021 * dma_alloc_noncoherent() returns non-cacheable memory, so there's no need to
22 * do any flushing here.
23 */
Ley Foon Tane23c6212014-11-06 15:19:53 +080024static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
25 enum dma_data_direction direction)
26{
27}
28
Ley Foon Tane23c6212014-11-06 15:19:53 +080029#endif /* _ASM_NIOS2_DMA_MAPPING_H */