aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-07-19 16:29:53 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-07-23 11:27:08 -0400
commit6c0a11c118471f79795202348fbd0e6580341794 (patch)
tree3fdd1b450e32203703ef56a3f1e6666c472312a1 /arch/powerpc/sysdev
parent66afe8780f297edb4c4716bc326e127ec2923422 (diff)
[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 <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c14
-rw-r--r--arch/powerpc/sysdev/fsl_pci.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 2eefcde5b0da..faafae601a72 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)
142 return 0; 142 return 0;
143} 143}
144 144
145void fsl_pcibios_fixup_bus(struct pci_bus *bus)
146{
147 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
148 int i;
149
150 /* deal with bogus pci_bus when we don't have anything connected on PCIe */
151 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
152 if (bus->parent) {
153 for (i = 0; i < 4; ++i)
154 bus->resource[i] = bus->parent->resource[i];
155 }
156 }
157}
158
145int __init fsl_add_bridge(struct device_node *dev, int is_primary) 159int __init fsl_add_bridge(struct device_node *dev, int is_primary)
146{ 160{
147 int len; 161 int len;
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
index 700d47827994..37b04ad26571 100644
--- a/arch/powerpc/sysdev/fsl_pci.h
+++ b/arch/powerpc/sysdev/fsl_pci.h
@@ -82,6 +82,7 @@ struct ccsr_pci {
82}; 82};
83 83
84extern int fsl_add_bridge(struct device_node *dev, int is_primary); 84extern int fsl_add_bridge(struct device_node *dev, int is_primary);
85extern void fsl_pcibios_fixup_bus(struct pci_bus *bus);
85 86
86#endif /* __POWERPC_FSL_PCI_H */ 87#endif /* __POWERPC_FSL_PCI_H */
87#endif /* __KERNEL__ */ 88#endif /* __KERNEL__ */