Linux Audio

Check our new training course

Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef ___ASM_SPARC_DMA_MAPPING_H
 3#define ___ASM_SPARC_DMA_MAPPING_H
 4
 
 
 
 
 5extern const struct dma_map_ops *dma_ops;
 
 
 
 6
 7static inline const struct dma_map_ops *get_arch_dma_ops(void)
 8{
 9	/* sparc32 uses per-device dma_ops */
10	return IS_ENABLED(CONFIG_SPARC64) ? dma_ops : NULL;
 
 
 
 
 
 
 
11}
12
13#endif
v4.17
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef ___ASM_SPARC_DMA_MAPPING_H
 3#define ___ASM_SPARC_DMA_MAPPING_H
 4
 5#include <linux/scatterlist.h>
 6#include <linux/mm.h>
 7#include <linux/dma-debug.h>
 8
 9extern const struct dma_map_ops *dma_ops;
10extern const struct dma_map_ops pci32_dma_ops;
11
12extern struct bus_type pci_bus_type;
13
14static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
15{
16#ifdef CONFIG_SPARC_LEON
17	if (sparc_cpu_model == sparc_leon)
18		return &pci32_dma_ops;
19#endif
20#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
21	if (bus == &pci_bus_type)
22		return &pci32_dma_ops;
23#endif
24	return dma_ops;
25}
26
27#endif