summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
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)
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 700d47827994..37b04ad26571 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__ */