blob: b957ca5527a3d23c603a53eab461991536cc66ff [file] [log] [blame]
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07001#ifndef __SPARC64_PCI_H
2#define __SPARC64_PCI_H
3
4#ifdef __KERNEL__
5
6#include <linux/dma-mapping.h>
7
8/* Can be used to override the logic in pci_scan_bus for skipping
9 * already-configured bus numbers - to be used for buggy BIOSes
10 * or architectures with incomplete PCI setup by the loader.
11 */
12#define pcibios_assign_all_busses() 0
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070013
14#define PCIBIOS_MIN_IO 0UL
15#define PCIBIOS_MIN_MEM 0UL
16
17#define PCI_IRQ_NONE 0xffffffff
18
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070019/* The PCI address space does not equal the physical memory
20 * address space. The networking and block device layers use
21 * this boolean for bounce buffer decisions.
22 */
23#define PCI_DMA_BUS_IS_PHYS (0)
24
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070025/* PCI IOMMU mapping bypass support. */
26
27/* PCI 64-bit addressing works for all slots on all controller
28 * types on sparc64. However, it requires that the device
29 * can drive enough of the 64 bits.
30 */
FUJITA Tomonori4ad9b202010-10-27 15:34:47 -070031#define PCI64_REQUIRED_MASK (~(u64)0)
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070032#define PCI64_ADDR_BASE 0xfffc000000000000UL
33
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070034/* Return the index of the PCI controller for device PDEV. */
35
Sam Ravnborgf05a6862014-05-16 23:25:50 +020036int pci_domain_nr(struct pci_bus *bus);
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070037static inline int pci_proc_domain(struct pci_bus *bus)
38{
39 return 1;
40}
41
42/* Platform support for /proc/bus/pci/X/Y mmap()s. */
43
44#define HAVE_PCI_MMAP
David Woodhousee854d8b2017-04-12 13:25:56 +010045#define arch_can_pci_mmap_io() 1
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070046#define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
47#define get_pci_unmapped_area get_fb_unmapped_area
48
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070049static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
50{
51 return PCI_IRQ_NONE;
52}
53
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070054#define HAVE_ARCH_PCI_RESOURCE_TO_USER
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070055#endif /* __KERNEL__ */
56
57#endif /* __SPARC64_PCI_H */