diff options
Diffstat (limited to 'include/asm-powerpc/pci-bridge.h')
-rw-r--r-- | include/asm-powerpc/pci-bridge.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index e72c2a60853c..e909769b6410 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -45,10 +45,17 @@ struct pci_controller { | |||
45 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 45 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
46 | * to determine which bus number to match on when generating type0 | 46 | * to determine which bus number to match on when generating type0 |
47 | * config cycles | 47 | * config cycles |
48 | * NO_PCIE_LINK - the Freescale PCI-e controllers have issues with | ||
49 | * hanging if we don't have link and try to do config cycles to | ||
50 | * anything but the PHB. Only allow talking to the PHB if this is | ||
51 | * set. | ||
52 | * BIG_ENDIAN - cfg_addr is a big endian register | ||
48 | */ | 53 | */ |
49 | #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) | 54 | #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) |
50 | #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) | 55 | #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) |
51 | #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) | 56 | #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) |
57 | #define PPC_INDIRECT_TYPE_NO_PCIE_LINK (0x00000008) | ||
58 | #define PPC_INDIRECT_TYPE_BIG_ENDIAN (0x00000010) | ||
52 | u32 indirect_type; | 59 | u32 indirect_type; |
53 | 60 | ||
54 | /* Currently, we limit ourselves to 1 IO range and 3 mem | 61 | /* Currently, we limit ourselves to 1 IO range and 3 mem |
@@ -64,6 +71,14 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
64 | return bus->sysdata; | 71 | return bus->sysdata; |
65 | } | 72 | } |
66 | 73 | ||
74 | static inline int isa_vaddr_is_ioport(void __iomem *address) | ||
75 | { | ||
76 | /* No specific ISA handling on ppc32 at this stage, it | ||
77 | * all goes through PCI | ||
78 | */ | ||
79 | return 0; | ||
80 | } | ||
81 | |||
67 | /* These are used for config access before all the PCI probing | 82 | /* These are used for config access before all the PCI probing |
68 | has been done. */ | 83 | has been done. */ |
69 | int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn, | 84 | int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn, |
@@ -79,11 +94,14 @@ int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn, | |||
79 | int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn, | 94 | int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn, |
80 | int where, u32 val); | 95 | int where, u32 val); |
81 | 96 | ||
82 | extern void setup_indirect_pci_nomap(struct pci_controller* hose, | 97 | extern int early_find_capability(struct pci_controller *hose, int bus, |
83 | void __iomem *cfg_addr, void __iomem *cfg_data); | 98 | int dev_fn, int cap); |
99 | |||
84 | extern void setup_indirect_pci(struct pci_controller* hose, | 100 | extern void setup_indirect_pci(struct pci_controller* hose, |
85 | u32 cfg_addr, u32 cfg_data); | 101 | u32 cfg_addr, u32 cfg_data, u32 flags); |
86 | extern void setup_grackle(struct pci_controller *hose); | 102 | extern void setup_grackle(struct pci_controller *hose); |
103 | extern void __init update_bridge_resource(struct pci_dev *dev, | ||
104 | struct resource *res); | ||
87 | 105 | ||
88 | #else | 106 | #else |
89 | 107 | ||
@@ -231,6 +249,13 @@ extern void pcibios_free_controller(struct pci_controller *phb); | |||
231 | 249 | ||
232 | extern void isa_bridge_find_early(struct pci_controller *hose); | 250 | extern void isa_bridge_find_early(struct pci_controller *hose); |
233 | 251 | ||
252 | static inline int isa_vaddr_is_ioport(void __iomem *address) | ||
253 | { | ||
254 | /* Check if address hits the reserved legacy IO range */ | ||
255 | unsigned long ea = (unsigned long)address; | ||
256 | return ea >= ISA_IO_BASE && ea < ISA_IO_END; | ||
257 | } | ||
258 | |||
234 | extern int pcibios_unmap_io_space(struct pci_bus *bus); | 259 | extern int pcibios_unmap_io_space(struct pci_bus *bus); |
235 | extern int pcibios_map_io_space(struct pci_bus *bus); | 260 | extern int pcibios_map_io_space(struct pci_bus *bus); |
236 | 261 | ||
@@ -261,11 +286,16 @@ extern struct pci_controller * | |||
261 | pcibios_alloc_controller(struct device_node *dev); | 286 | pcibios_alloc_controller(struct device_node *dev); |
262 | #ifdef CONFIG_PCI | 287 | #ifdef CONFIG_PCI |
263 | extern unsigned long pci_address_to_pio(phys_addr_t address); | 288 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
289 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | ||
264 | #else | 290 | #else |
265 | static inline unsigned long pci_address_to_pio(phys_addr_t address) | 291 | static inline unsigned long pci_address_to_pio(phys_addr_t address) |
266 | { | 292 | { |
267 | return (unsigned long)-1; | 293 | return (unsigned long)-1; |
268 | } | 294 | } |
295 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) | ||
296 | { | ||
297 | return 0; | ||
298 | } | ||
269 | #endif | 299 | #endif |
270 | 300 | ||
271 | 301 | ||