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 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 19 | static inline void pcibios_penalize_isa_irq(int irq, int active) |
| 20 | { |
| 21 | /* We don't do dynamic PCI IRQ allocation */ |
| 22 | } |
| 23 | |
| 24 | /* Dynamic DMA mapping stuff. |
| 25 | */ |
| 26 | #define PCI_DMA_BUS_IS_PHYS (0) |
| 27 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 28 | struct pci_dev; |
| 29 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 30 | #ifdef CONFIG_PCI |
| 31 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
| 32 | enum pci_dma_burst_strategy *strat, |
| 33 | unsigned long *strategy_parameter) |
| 34 | { |
| 35 | *strat = PCI_DMA_BURST_INFINITY; |
| 36 | *strategy_parameter = ~0UL; |
| 37 | } |
| 38 | #endif |
| 39 | |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 40 | #endif /* __KERNEL__ */ |
| 41 | |
Daniel Hellstrom | 26893c1 | 2011-05-23 21:04:47 +0000 | [diff] [blame] | 42 | #ifndef CONFIG_LEON_PCI |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 43 | /* generic pci stuff */ |
| 44 | #include <asm-generic/pci.h> |
Daniel Hellstrom | 26893c1 | 2011-05-23 21:04:47 +0000 | [diff] [blame] | 45 | #else |
| 46 | /* |
| 47 | * On LEON PCI Memory space is mapped 1:1 with physical address space. |
| 48 | * |
| 49 | * I/O space is located at low 64Kbytes in PCI I/O space. The I/O addresses |
| 50 | * are converted into CPU addresses to virtual addresses that are mapped with |
| 51 | * MMU to the PCI Host PCI I/O space window which are translated to the low |
| 52 | * 64Kbytes by the Host controller. |
| 53 | */ |
| 54 | |
Daniel Hellstrom | 26893c1 | 2011-05-23 21:04:47 +0000 | [diff] [blame] | 55 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
| 56 | { |
| 57 | return PCI_IRQ_NONE; |
| 58 | } |
| 59 | #endif |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 60 | |
| 61 | #endif /* __SPARC_PCI_H */ |