diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-11-11 01:25:08 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:38:49 -0500 |
commit | 4c9d2800be5dfabf26acdeb401cbabe9edc1dcf2 (patch) | |
tree | 8d9a4f96cba4a1cc16a1e661d00f88e3e048491f /arch/powerpc/kernel/rtas_pci.c | |
parent | 803d4573e60bc890d7fbc040ad1c18c2dc7f8279 (diff) |
[POWERPC] Generic OF platform driver for PCI host bridges.
When enabled in Kconfig, it will pick up any of_platform_device
matching it's match list (currently type "pci", "pcix", "pcie",
or "ht" and setup a PHB for it.
Platform must provide a ppc_md.pci_setup_phb() for it to work
(for doing the necessary initialisations specific to a given PHB
like setting up the config space ops).
It's currently only available on 64 bits as the 32 bits PCI code
can't quite cope with it in it's current form. I will fix that
later.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/rtas_pci.c')
-rw-r--r-- | arch/powerpc/kernel/rtas_pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 2576e12d7255..03cacc25a0ae 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -257,8 +257,10 @@ static int phb_set_bus_ranges(struct device_node *dev, | |||
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
259 | 259 | ||
260 | int __devinit setup_phb(struct device_node *dev, struct pci_controller *phb) | 260 | int __devinit rtas_setup_phb(struct pci_controller *phb) |
261 | { | 261 | { |
262 | struct device_node *dev = phb->arch_data; | ||
263 | |||
262 | if (is_python(dev)) | 264 | if (is_python(dev)) |
263 | python_countermeasures(dev); | 265 | python_countermeasures(dev); |
264 | 266 | ||
@@ -290,7 +292,7 @@ unsigned long __init find_and_init_phbs(void) | |||
290 | phb = pcibios_alloc_controller(node); | 292 | phb = pcibios_alloc_controller(node); |
291 | if (!phb) | 293 | if (!phb) |
292 | continue; | 294 | continue; |
293 | setup_phb(node, phb); | 295 | rtas_setup_phb(phb); |
294 | pci_process_bridge_OF_ranges(phb, node, 0); | 296 | pci_process_bridge_OF_ranges(phb, node, 0); |
295 | pci_setup_phb_io(phb, index == 0); | 297 | pci_setup_phb_io(phb, index == 0); |
296 | index++; | 298 | index++; |
@@ -362,7 +364,6 @@ int pcibios_remove_root_bus(struct pci_controller *phb) | |||
362 | } | 364 | } |
363 | } | 365 | } |
364 | 366 | ||
365 | list_del(&phb->list_node); | ||
366 | pcibios_free_controller(phb); | 367 | pcibios_free_controller(phb); |
367 | 368 | ||
368 | return 0; | 369 | return 0; |