blob: 4deddf430e5d18cae2710cf1d74ebdb2aaf170a6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sam Ravnborga439fe52008-07-27 23:00:59 +02002#ifndef ___ASM_SPARC_PCI_H
3#define ___ASM_SPARC_PCI_H
Christoph Hellwig6aa69752018-12-08 09:40:03 -08004
5
6/* Can be used to override the logic in pci_scan_bus for skipping
7 * already-configured bus numbers - to be used for buggy BIOSes
8 * or architectures with incomplete PCI setup by the loader.
9 */
10#define pcibios_assign_all_busses() 0
11
12#define PCIBIOS_MIN_IO 0UL
13#define PCIBIOS_MIN_MEM 0UL
14
15#define PCI_IRQ_NONE 0xffffffff
16
17
18#ifdef CONFIG_SPARC64
19
20/* PCI IOMMU mapping bypass support. */
21
22/* PCI 64-bit addressing works for all slots on all controller
23 * types on sparc64. However, it requires that the device
24 * can drive enough of the 64 bits.
25 */
26#define PCI64_REQUIRED_MASK (~(u64)0)
27#define PCI64_ADDR_BASE 0xfffc000000000000UL
28
29/* Return the index of the PCI controller for device PDEV. */
30int pci_domain_nr(struct pci_bus *bus);
31static inline int pci_proc_domain(struct pci_bus *bus)
32{
33 return 1;
34}
35
36/* Platform support for /proc/bus/pci/X/Y mmap()s. */
37#define HAVE_PCI_MMAP
38#define arch_can_pci_mmap_io() 1
39#define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
40#define get_pci_unmapped_area get_fb_unmapped_area
Christoph Hellwig6aa69752018-12-08 09:40:03 -080041#endif /* CONFIG_SPARC64 */
42
43#if defined(CONFIG_SPARC64) || defined(CONFIG_LEON_PCI)
44static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
45{
46 return PCI_IRQ_NONE;
47}
Sam Ravnborga439fe52008-07-27 23:00:59 +020048#else
Christoph Hellwig6aa69752018-12-08 09:40:03 -080049#include <asm-generic/pci.h>
Sam Ravnborga439fe52008-07-27 23:00:59 +020050#endif
Christoph Hellwig6aa69752018-12-08 09:40:03 -080051
52#endif /* ___ASM_SPARC_PCI_H */