dma-mapping.h (dffbfde7582b03f57aed15055dbf8af433c5b1ae) dma-mapping.h (f8c55dc6e828324fc58c0bb32d72a5a4041d1c3b)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_DMA_MAPPING_H
3#define _ASM_DMA_MAPPING_H
4
5#include <linux/scatterlist.h>
6#include <asm/dma-coherence.h>
7#include <asm/cache.h>
8

--- 5 unchanged lines hidden (view full) ---

14extern const struct dma_map_ops mips_swiotlb_ops;
15
16static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
17{
18#ifdef CONFIG_SWIOTLB
19 return &mips_swiotlb_ops;
20#elif defined(CONFIG_MIPS_DMA_DEFAULT)
21 return &mips_default_dma_map_ops;
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_DMA_MAPPING_H
3#define _ASM_DMA_MAPPING_H
4
5#include <linux/scatterlist.h>
6#include <asm/dma-coherence.h>
7#include <asm/cache.h>
8

--- 5 unchanged lines hidden (view full) ---

14extern const struct dma_map_ops mips_swiotlb_ops;
15
16static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
17{
18#ifdef CONFIG_SWIOTLB
19 return &mips_swiotlb_ops;
20#elif defined(CONFIG_MIPS_DMA_DEFAULT)
21 return &mips_default_dma_map_ops;
22#elif defined(CONFIG_DMA_NONCOHERENT_OPS)
23 return &dma_noncoherent_ops;
22#else
23 return &dma_direct_ops;
24#endif
25}
26
27#define arch_setup_dma_ops arch_setup_dma_ops
28static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
29 u64 size, const struct iommu_ops *iommu,
30 bool coherent)
31{
32#ifdef CONFIG_DMA_PERDEV_COHERENT
33 dev->archdata.dma_coherent = coherent;
34#endif
35}
36
37#endif /* _ASM_DMA_MAPPING_H */
24#else
25 return &dma_direct_ops;
26#endif
27}
28
29#define arch_setup_dma_ops arch_setup_dma_ops
30static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
31 u64 size, const struct iommu_ops *iommu,
32 bool coherent)
33{
34#ifdef CONFIG_DMA_PERDEV_COHERENT
35 dev->archdata.dma_coherent = coherent;
36#endif
37}
38
39#endif /* _ASM_DMA_MAPPING_H */