1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef ___ASM_SPARC_PCI_H 3*4882a593Smuzhiyun #define ___ASM_SPARC_PCI_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun /* Can be used to override the logic in pci_scan_bus for skipping 7*4882a593Smuzhiyun * already-configured bus numbers - to be used for buggy BIOSes 8*4882a593Smuzhiyun * or architectures with incomplete PCI setup by the loader. 9*4882a593Smuzhiyun */ 10*4882a593Smuzhiyun #define pcibios_assign_all_busses() 0 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun #define PCIBIOS_MIN_IO 0UL 13*4882a593Smuzhiyun #define PCIBIOS_MIN_MEM 0UL 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun #define PCI_IRQ_NONE 0xffffffff 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #ifdef CONFIG_SPARC64 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun /* PCI IOMMU mapping bypass support. */ 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun /* PCI 64-bit addressing works for all slots on all controller 23*4882a593Smuzhiyun * types on sparc64. However, it requires that the device 24*4882a593Smuzhiyun * can drive enough of the 64 bits. 25*4882a593Smuzhiyun */ 26*4882a593Smuzhiyun #define PCI64_REQUIRED_MASK (~(u64)0) 27*4882a593Smuzhiyun #define PCI64_ADDR_BASE 0xfffc000000000000UL 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun /* Return the index of the PCI controller for device PDEV. */ 30*4882a593Smuzhiyun int pci_domain_nr(struct pci_bus *bus); pci_proc_domain(struct pci_bus * bus)31*4882a593Smuzhiyunstatic inline int pci_proc_domain(struct pci_bus *bus) 32*4882a593Smuzhiyun { 33*4882a593Smuzhiyun return 1; 34*4882a593Smuzhiyun } 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun /* Platform support for /proc/bus/pci/X/Y mmap()s. */ 37*4882a593Smuzhiyun #define HAVE_PCI_MMAP 38*4882a593Smuzhiyun #define arch_can_pci_mmap_io() 1 39*4882a593Smuzhiyun #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA 40*4882a593Smuzhiyun #define get_pci_unmapped_area get_fb_unmapped_area 41*4882a593Smuzhiyun #endif /* CONFIG_SPARC64 */ 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #if defined(CONFIG_SPARC64) || defined(CONFIG_LEON_PCI) pci_get_legacy_ide_irq(struct pci_dev * dev,int channel)44*4882a593Smuzhiyunstatic inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 45*4882a593Smuzhiyun { 46*4882a593Smuzhiyun return PCI_IRQ_NONE; 47*4882a593Smuzhiyun } 48*4882a593Smuzhiyun #else 49*4882a593Smuzhiyun #include <asm-generic/pci.h> 50*4882a593Smuzhiyun #endif 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun #endif /* ___ASM_SPARC_PCI_H */ 53