Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6c0a11c118471f79795202348fbd0e6580341794
Commit:     6c0a11c118471f79795202348fbd0e6580341794
Parent:     66afe8780f297edb4c4716bc326e127ec2923422
Author:     Kumar Gala <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 15:29:53 2007 -0500
Committer:  Kumar Gala <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 10:27:08 2007 -0500

    [POWERPC] Fixup resources on pci_bus for PCIe PHB when no device is 
connected
    
    On the 85xx/86xx PCIe controllers if there is no device connected to the
    PHB we will still allocate a pci_bus for downstream bus of the virtual
    P2P bridge. However the resources allocated to the downstream bus are not
    correct and so we just mimic the resources from the upstream pci_bus.
    
    Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/85xx/mpc85xx_cds.c  |    1 +
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |    2 +-
 arch/powerpc/sysdev/fsl_pci.c              |   14 ++++++++++++++
 arch/powerpc/sysdev/fsl_pci.h              |    1 +
 4 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c 
b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 2539bb5..9b559eb 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -272,4 +272,5 @@ define_machine(mpc85xx_cds) {
        .restart        = mpc85xx_restart,
        .calibrate_decr = generic_calibrate_decr,
        .progress       = udbg_progress,
+       .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
 };
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c 
b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index e67e10d..e9eaa07 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -431,7 +431,6 @@ mpc86xx_time_init(void)
        return 0;
 }
 
-
 define_machine(mpc86xx_hpcn) {
        .name                   = "MPC86xx HPCN",
        .probe                  = mpc86xx_hpcn_probe,
@@ -443,4 +442,5 @@ define_machine(mpc86xx_hpcn) {
        .time_init              = mpc86xx_time_init,
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = udbg_progress,
+       .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
 };
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 2eefcde..faafae6 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -142,6 +142,20 @@ int __init fsl_pcie_check_link(struct pci_controller *hose)
        return 0;
 }
 
+void fsl_pcibios_fixup_bus(struct pci_bus *bus)
+{
+       struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
+       int i;
+
+       /* deal with bogus pci_bus when we don't have anything connected on 
PCIe */
+       if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
+               if (bus->parent) {
+                       for (i = 0; i < 4; ++i)
+                               bus->resource[i] = bus->parent->resource[i];
+               }
+       }
+}
+
 int __init fsl_add_bridge(struct device_node *dev, int is_primary)
 {
        int len;
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
index 700d478..37b04ad 100644
--- a/arch/powerpc/sysdev/fsl_pci.h
+++ b/arch/powerpc/sysdev/fsl_pci.h
@@ -82,6 +82,7 @@ struct ccsr_pci {
 };
 
 extern int fsl_add_bridge(struct device_node *dev, int is_primary);
+extern void fsl_pcibios_fixup_bus(struct pci_bus *bus);
 
 #endif /* __POWERPC_FSL_PCI_H */
 #endif /* __KERNEL__ */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to