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/pci_64.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/pci_64.c')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 74e580d25c1b..d800e19ea564 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -210,6 +210,10 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev) | |||
210 | 210 | ||
211 | void pcibios_free_controller(struct pci_controller *phb) | 211 | void pcibios_free_controller(struct pci_controller *phb) |
212 | { | 212 | { |
213 | spin_lock(&hose_spinlock); | ||
214 | list_del(&phb->list_node); | ||
215 | spin_unlock(&hose_spinlock); | ||
216 | |||
213 | if (phb->is_dynamic) | 217 | if (phb->is_dynamic) |
214 | kfree(phb); | 218 | kfree(phb); |
215 | } | 219 | } |
@@ -1242,6 +1246,11 @@ static void __devinit do_bus_setup(struct pci_bus *bus) | |||
1242 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 1246 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) |
1243 | { | 1247 | { |
1244 | struct pci_dev *dev = bus->self; | 1248 | struct pci_dev *dev = bus->self; |
1249 | struct device_node *np; | ||
1250 | |||
1251 | np = pci_bus_to_OF_node(bus); | ||
1252 | |||
1253 | DBG("pcibios_fixup_bus(%s)\n", np ? np->full_name : "<???>"); | ||
1245 | 1254 | ||
1246 | if (dev && pci_probe_only && | 1255 | if (dev && pci_probe_only && |
1247 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { | 1256 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { |