Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / mips / include / asm / dma-mapping.h
blob886e75a383f27c35d2bc85e9a42ad03106d1d3f8
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_DMA_MAPPING_H
3 #define _ASM_DMA_MAPPING_H
5 #include <linux/scatterlist.h>
6 #include <asm/dma-coherence.h>
7 #include <asm/cache.h>
9 #ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */
10 #include <dma-coherence.h>
11 #endif
13 extern const struct dma_map_ops *mips_dma_map_ops;
15 static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
17 return mips_dma_map_ops;
20 #define arch_setup_dma_ops arch_setup_dma_ops
21 static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
22 u64 size, const struct iommu_ops *iommu,
23 bool coherent)
25 #ifdef CONFIG_DMA_PERDEV_COHERENT
26 dev->archdata.dma_coherent = coherent;
27 #endif
30 #endif /* _ASM_DMA_MAPPING_H */