Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_DMA_MAPPING_H
3#define _ASM_DMA_MAPPING_H
4
5#include <linux/swiotlb.h>
6
7extern const struct dma_map_ops jazz_dma_ops;
8
9static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
10{
11#if defined(CONFIG_MACH_JAZZ)
12 return &jazz_dma_ops;
13#else
14 return NULL;
15#endif
16}
17
18#define arch_setup_dma_ops arch_setup_dma_ops
19static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
20 u64 size, const struct iommu_ops *iommu,
21 bool coherent)
22{
23#ifdef CONFIG_DMA_PERDEV_COHERENT
24 dev->dma_coherent = coherent;
25#endif
26}
27
28#endif /* _ASM_DMA_MAPPING_H */