blob: 02939abd356cf80e26a0e93b0cba7861f9f7d946 [file] [log] [blame]
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07001#ifndef __SPARC_PCI_H
2#define __SPARC_PCI_H
3
4#ifdef __KERNEL__
5
David S. Miller9dc69232008-08-27 19:54:01 -07006#include <linux/dma-mapping.h>
7
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07008/* 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
19static inline void pcibios_set_master(struct pci_dev *dev)
20{
21 /* No special bus mastering setup handling */
22}
23
24static 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 Ravnborgf5e706a2008-07-17 21:55:51 -070033struct pci_dev;
34
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070035#ifdef CONFIG_PCI
36static inline void pci_dma_burst_advice(struct pci_dev *pdev,
37 enum pci_dma_burst_strategy *strat,
38 unsigned long *strategy_parameter)
39{
40 *strat = PCI_DMA_BURST_INFINITY;
41 *strategy_parameter = ~0UL;
42}
43#endif
44
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070045#endif /* __KERNEL__ */
46
Daniel Hellstrom26893c12011-05-23 21:04:47 +000047#ifndef CONFIG_LEON_PCI
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070048/* generic pci stuff */
49#include <asm-generic/pci.h>
Daniel Hellstrom26893c12011-05-23 21:04:47 +000050#else
51/*
52 * On LEON PCI Memory space is mapped 1:1 with physical address space.
53 *
54 * I/O space is located at low 64Kbytes in PCI I/O space. The I/O addresses
55 * are converted into CPU addresses to virtual addresses that are mapped with
56 * MMU to the PCI Host PCI I/O space window which are translated to the low
57 * 64Kbytes by the Host controller.
58 */
59
60extern void
61pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
62 struct resource *res);
63
64extern void
65pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
66 struct pci_bus_region *region);
67
68static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
69{
70 return PCI_IRQ_NONE;
71}
72#endif
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070073
74#endif /* __SPARC_PCI_H */