xref: /linux/arch/sparc/include/asm/pci.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2a439fe51SSam Ravnborg #ifndef ___ASM_SPARC_PCI_H
3a439fe51SSam Ravnborg #define ___ASM_SPARC_PCI_H
46aa69750SChristoph Hellwig 
56aa69750SChristoph Hellwig 
66aa69750SChristoph Hellwig /* Can be used to override the logic in pci_scan_bus for skipping
76aa69750SChristoph Hellwig  * already-configured bus numbers - to be used for buggy BIOSes
86aa69750SChristoph Hellwig  * or architectures with incomplete PCI setup by the loader.
96aa69750SChristoph Hellwig  */
106aa69750SChristoph Hellwig #define pcibios_assign_all_busses()	0
116aa69750SChristoph Hellwig 
126aa69750SChristoph Hellwig #define PCIBIOS_MIN_IO		0UL
136aa69750SChristoph Hellwig #define PCIBIOS_MIN_MEM		0UL
146aa69750SChristoph Hellwig 
156aa69750SChristoph Hellwig #define PCI_IRQ_NONE		0xffffffff
166aa69750SChristoph Hellwig 
176aa69750SChristoph Hellwig 
186aa69750SChristoph Hellwig #ifdef CONFIG_SPARC64
196aa69750SChristoph Hellwig 
206aa69750SChristoph Hellwig /* PCI IOMMU mapping bypass support. */
216aa69750SChristoph Hellwig 
226aa69750SChristoph Hellwig /* PCI 64-bit addressing works for all slots on all controller
236aa69750SChristoph Hellwig  * types on sparc64.  However, it requires that the device
246aa69750SChristoph Hellwig  * can drive enough of the 64 bits.
256aa69750SChristoph Hellwig  */
266aa69750SChristoph Hellwig #define PCI64_REQUIRED_MASK	(~(u64)0)
276aa69750SChristoph Hellwig #define PCI64_ADDR_BASE		0xfffc000000000000UL
286aa69750SChristoph Hellwig 
296aa69750SChristoph Hellwig /* Return the index of the PCI controller for device PDEV. */
306aa69750SChristoph Hellwig int pci_domain_nr(struct pci_bus *bus);
pci_proc_domain(struct pci_bus * bus)316aa69750SChristoph Hellwig static inline int pci_proc_domain(struct pci_bus *bus)
326aa69750SChristoph Hellwig {
336aa69750SChristoph Hellwig 	return 1;
346aa69750SChristoph Hellwig }
356aa69750SChristoph Hellwig 
366aa69750SChristoph Hellwig /* Platform support for /proc/bus/pci/X/Y mmap()s. */
376aa69750SChristoph Hellwig #define HAVE_PCI_MMAP
386aa69750SChristoph Hellwig #define arch_can_pci_mmap_io()	1
396aa69750SChristoph Hellwig #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
40*c1ef3224SArnd Bergmann #define ARCH_GENERIC_PCI_MMAP_RESOURCE
416aa69750SChristoph Hellwig #define get_pci_unmapped_area get_fb_unmapped_area
426aa69750SChristoph Hellwig #endif /* CONFIG_SPARC64 */
436aa69750SChristoph Hellwig 
446aa69750SChristoph Hellwig #endif /* ___ASM_SPARC_PCI_H */
45