Cc: Oliver O'Halloran <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Fixes: 407d418f2fd4 ("powerpc/chrp: Move PHB discovery")
Signed-off-by: Guenter Roeck <[email protected]>
---
arch/powerpc/include/asm/hydra.h | 2 ++
arch/powerpc/platforms/chrp/pci.c | 11 ++---------
arch/powerpc/platforms/chrp/setup.c | 12 +++++++++++-
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/include/asm/hydra.h
b/arch/powerpc/include/asm/hydra.h
index d024447283a0..ae02eb53d6ef 100644
--- a/arch/powerpc/include/asm/hydra.h
+++ b/arch/powerpc/include/asm/hydra.h
@@ -94,6 +94,8 @@ extern volatile struct Hydra __iomem *Hydra;
#define HYDRA_INT_EXT7 18 /* Power Off Request */
#define HYDRA_INT_SPARE 19
+extern int hydra_init(void);
+
#endif /* __KERNEL__ */
#endif /* _ASMPPC_HYDRA_H */
diff --git a/arch/powerpc/platforms/chrp/pci.c
b/arch/powerpc/platforms/chrp/pci.c
index 76e6256cb0a7..b2c2bf35b76c 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -131,7 +131,8 @@ static struct pci_ops rtas_pci_ops =
volatile struct Hydra __iomem *Hydra = NULL;
-static int __init hydra_init(void)
+int __init
+hydra_init(void)
{
struct device_node *np;
struct resource r;
@@ -313,14 +314,6 @@ chrp_find_bridges(void)
}
}
of_node_put(root);
-
- /*
- * "Temporary" fixes for PCI devices.
- * -- Geert
- */
- hydra_init(); /* Mac I/O */
-
- pci_create_OF_bus_map();
}
/* SL82C105 IDE Control/Status Register */
diff --git a/arch/powerpc/platforms/chrp/setup.c
b/arch/powerpc/platforms/chrp/setup.c
index 3cfc382841e5..c45435aa5e36 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -334,11 +334,22 @@ static void __init chrp_setup_arch(void)
/* On pegasos, enable the L2 cache if not already done by OF */
pegasos_set_l2cr();
+ /* Lookup PCI host bridges */
+ chrp_find_bridges();
+
+ /*
+ * Temporary fixes for PCI devices.
+ * -- Geert
+ */
+ hydra_init(); /* Mac I/O */
+
/*
* Fix the Super I/O configuration
*/
sio_init();
+ pci_create_OF_bus_map();
+
/*
* Print the banner, then scroll down so boot progress
* can be printed. -- Cort
@@ -571,7 +582,6 @@ define_machine(chrp) {
.name = "CHRP",
.probe = chrp_probe,
.setup_arch = chrp_setup_arch,
- .discover_phbs = chrp_find_bridges,
.init = chrp_init2,
.show_cpuinfo = chrp_show_cpuinfo,
.init_IRQ = chrp_init_IRQ,
--
2.25.1