1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __SPARC64_PCI_H
3 #define __SPARC64_PCI_H
7 #include <linux/dma-mapping.h>
9 /* Can be used to override the logic in pci_scan_bus for skipping
10 * already-configured bus numbers - to be used for buggy BIOSes
11 * or architectures with incomplete PCI setup by the loader.
13 #define pcibios_assign_all_busses() 0
15 #define PCIBIOS_MIN_IO 0UL
16 #define PCIBIOS_MIN_MEM 0UL
18 #define PCI_IRQ_NONE 0xffffffff
20 /* PCI IOMMU mapping bypass support. */
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.
26 #define PCI64_REQUIRED_MASK (~(u64)0)
27 #define PCI64_ADDR_BASE 0xfffc000000000000UL
29 /* Return the index of the PCI controller for device PDEV. */
31 int pci_domain_nr(struct pci_bus *bus);
32 static inline int pci_proc_domain(struct pci_bus *bus)
37 /* Platform support for /proc/bus/pci/X/Y mmap()s. */
40 #define arch_can_pci_mmap_io() 1
41 #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
42 #define get_pci_unmapped_area get_fb_unmapped_area
44 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
49 #define HAVE_ARCH_PCI_RESOURCE_TO_USER
50 #endif /* __KERNEL__ */
52 #endif /* __SPARC64_PCI_H */