1 #ifndef ___ASM_SPARC_DMA_MAPPING_H
2 #define ___ASM_SPARC_DMA_MAPPING_H
4 #include <linux/scatterlist.h>
6 #include <linux/dma-debug.h>
8 #define HAVE_ARCH_DMA_SUPPORTED 1
9 int dma_supported(struct device *dev, u64 mask);
11 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
12 enum dma_data_direction dir)
14 /* Since dma_{alloc,free}_noncoherent() allocated coherent memory, this
15 * routine can be a nop.
19 extern const struct dma_map_ops *dma_ops;
20 extern const struct dma_map_ops pci32_dma_ops;
22 extern struct bus_type pci_bus_type;
24 static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
26 #ifdef CONFIG_SPARC_LEON
27 if (sparc_cpu_model == sparc_leon)
28 return &pci32_dma_ops;
30 #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
31 if (bus == &pci_bus_type)
32 return &pci32_dma_ops;