162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef ___ASM_SPARC_PCI_H 362306a36Sopenharmony_ci#define ___ASM_SPARC_PCI_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci/* Can be used to override the logic in pci_scan_bus for skipping 762306a36Sopenharmony_ci * already-configured bus numbers - to be used for buggy BIOSes 862306a36Sopenharmony_ci * or architectures with incomplete PCI setup by the loader. 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci#define pcibios_assign_all_busses() 0 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#define PCIBIOS_MIN_IO 0UL 1362306a36Sopenharmony_ci#define PCIBIOS_MIN_MEM 0UL 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define PCI_IRQ_NONE 0xffffffff 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci#ifdef CONFIG_SPARC64 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci/* PCI IOMMU mapping bypass support. */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* PCI 64-bit addressing works for all slots on all controller 2362306a36Sopenharmony_ci * types on sparc64. However, it requires that the device 2462306a36Sopenharmony_ci * can drive enough of the 64 bits. 2562306a36Sopenharmony_ci */ 2662306a36Sopenharmony_ci#define PCI64_REQUIRED_MASK (~(u64)0) 2762306a36Sopenharmony_ci#define PCI64_ADDR_BASE 0xfffc000000000000UL 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci/* Return the index of the PCI controller for device PDEV. */ 3062306a36Sopenharmony_ciint pci_domain_nr(struct pci_bus *bus); 3162306a36Sopenharmony_cistatic inline int pci_proc_domain(struct pci_bus *bus) 3262306a36Sopenharmony_ci{ 3362306a36Sopenharmony_ci return 1; 3462306a36Sopenharmony_ci} 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci/* Platform support for /proc/bus/pci/X/Y mmap()s. */ 3762306a36Sopenharmony_ci#define HAVE_PCI_MMAP 3862306a36Sopenharmony_ci#define arch_can_pci_mmap_io() 1 3962306a36Sopenharmony_ci#define HAVE_ARCH_PCI_GET_UNMAPPED_AREA 4062306a36Sopenharmony_ci#define ARCH_GENERIC_PCI_MMAP_RESOURCE 4162306a36Sopenharmony_ci#define get_pci_unmapped_area get_fb_unmapped_area 4262306a36Sopenharmony_ci#endif /* CONFIG_SPARC64 */ 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#endif /* ___ASM_SPARC_PCI_H */ 45