blob: ed32845bd2d2f941086626142284785bb0431527 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef ___ASM_SPARC_DMA_MAPPING_H
3#define ___ASM_SPARC_DMA_MAPPING_H
4
David Brazdil0f672f62019-12-10 10:32:29 +00005#include <asm/cpu_type.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006
7extern const struct dma_map_ops *dma_ops;
8
9extern struct bus_type pci_bus_type;
10
11static 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 Brazdil0f672f62019-12-10 10:32:29 +000015 return NULL;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000016#endif
17#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
18 if (bus == &pci_bus_type)
David Brazdil0f672f62019-12-10 10:32:29 +000019 return NULL;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000020#endif
21 return dma_ops;
22}
23
24#endif