Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef ___ASM_SPARC_DMA_MAPPING_H |
| 3 | #define ___ASM_SPARC_DMA_MAPPING_H |
| 4 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 5 | #include <asm/cpu_type.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 6 | |
| 7 | extern const struct dma_map_ops *dma_ops; |
| 8 | |
| 9 | extern struct bus_type pci_bus_type; |
| 10 | |
| 11 | static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) |
| 12 | { |
| 13 | #ifdef CONFIG_SPARC_LEON |
| 14 | if (sparc_cpu_model == sparc_leon) |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 15 | return NULL; |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 16 | #endif |
| 17 | #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) |
| 18 | if (bus == &pci_bus_type) |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 19 | return NULL; |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 20 | #endif |
| 21 | return dma_ops; |
| 22 | } |
| 23 | |
| 24 | #endif |