From acdd544eb45c7143fa7e4cda8de7bc5c4ff78109 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Sun, 6 Nov 2011 18:55:57 +0000 Subject: [PATCH] --- yaml --- r: 279525 b: refs/heads/master c: 491b98c315dbe39b20bd4a24a6179c42349f42c0 h: refs/heads/master i: 279523: 7b6006a61d9f70754899eacf94c317ea84d854e6 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/include/asm/machdep.h | 3 +++ trunk/arch/powerpc/kernel/pci-common.c | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1303b9c53422..e7b4ec180d4f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 09c188c4f6b331dbb61a2b5bd05d4c89c733fe33 +refs/heads/master: 491b98c315dbe39b20bd4a24a6179c42349f42c0 diff --git a/trunk/arch/powerpc/include/asm/machdep.h b/trunk/arch/powerpc/include/asm/machdep.h index b540d6fcedd6..bf37931d1ad6 100644 --- a/trunk/arch/powerpc/include/asm/machdep.h +++ b/trunk/arch/powerpc/include/asm/machdep.h @@ -213,6 +213,9 @@ struct machdep_calls { * allow assignment/enabling of the device. */ int (*pcibios_enable_device_hook)(struct pci_dev *); + /* Called after scan and before resource survey */ + void (*pcibios_fixup_phb)(struct pci_controller *hose); + /* Called to shutdown machine specific hardware not already controlled * by other drivers. */ diff --git a/trunk/arch/powerpc/kernel/pci-common.c b/trunk/arch/powerpc/kernel/pci-common.c index 458ed3bee663..f5b753de3718 100644 --- a/trunk/arch/powerpc/kernel/pci-common.c +++ b/trunk/arch/powerpc/kernel/pci-common.c @@ -1732,6 +1732,12 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) if (mode == PCI_PROBE_NORMAL) hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); + /* Platform gets a chance to do some global fixups before + * we proceed to resource allocation + */ + if (ppc_md.pcibios_fixup_phb) + ppc_md.pcibios_fixup_phb(hose); + /* Configure PCI Express settings */ if (bus && !pci_has_flag(PCI_PROBE_ONLY)) { struct pci_bus *child;