Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 1 | #ifndef __SPARC_PCI_H |
| 2 | #define __SPARC_PCI_H |
| 3 | |
| 4 | #ifdef __KERNEL__ |
| 5 | |
David S. Miller | 9dc6923 | 2008-08-27 19:54:01 -0700 | [diff] [blame] | 6 | #include <linux/dma-mapping.h> |
| 7 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 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 Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 13 | |
| 14 | #define PCIBIOS_MIN_IO 0UL |
| 15 | #define PCIBIOS_MIN_MEM 0UL |
| 16 | |
| 17 | #define PCI_IRQ_NONE 0xffffffff |
| 18 | |
| 19 | static inline void pcibios_set_master(struct pci_dev *dev) |
| 20 | { |
| 21 | /* No special bus mastering setup handling */ |
| 22 | } |
| 23 | |
| 24 | static inline void pcibios_penalize_isa_irq(int irq, int active) |
| 25 | { |
| 26 | /* We don't do dynamic PCI IRQ allocation */ |
| 27 | } |
| 28 | |
| 29 | /* Dynamic DMA mapping stuff. |
| 30 | */ |
| 31 | #define PCI_DMA_BUS_IS_PHYS (0) |
| 32 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 33 | struct pci_dev; |
| 34 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 35 | /* pci_unmap_{single,page} is not a nop, thus... */ |
| 36 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
| 37 | dma_addr_t ADDR_NAME; |
| 38 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ |
| 39 | __u32 LEN_NAME; |
| 40 | #define pci_unmap_addr(PTR, ADDR_NAME) \ |
| 41 | ((PTR)->ADDR_NAME) |
| 42 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ |
| 43 | (((PTR)->ADDR_NAME) = (VAL)) |
| 44 | #define pci_unmap_len(PTR, LEN_NAME) \ |
| 45 | ((PTR)->LEN_NAME) |
| 46 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
| 47 | (((PTR)->LEN_NAME) = (VAL)) |
| 48 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 49 | #ifdef CONFIG_PCI |
| 50 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
| 51 | enum pci_dma_burst_strategy *strat, |
| 52 | unsigned long *strategy_parameter) |
| 53 | { |
| 54 | *strat = PCI_DMA_BURST_INFINITY; |
| 55 | *strategy_parameter = ~0UL; |
| 56 | } |
| 57 | #endif |
| 58 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 59 | struct device_node; |
| 60 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); |
| 61 | |
| 62 | #endif /* __KERNEL__ */ |
| 63 | |
| 64 | /* generic pci stuff */ |
| 65 | #include <asm-generic/pci.h> |
| 66 | |
| 67 | #endif /* __SPARC_PCI_H */ |