|
@@ -144,7 +144,19 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
|
|
-/* Regist new bus to support workaround */
|
|
|
|
|
|
+/* Enable IO workaround */
|
|
|
|
+static void __devinit io_workaround_init(void)
|
|
|
|
+{
|
|
|
|
+ static int io_workaround_inited;
|
|
|
|
+
|
|
|
|
+ if (io_workaround_inited)
|
|
|
|
+ return;
|
|
|
|
+ ppc_pci_io = iowa_pci_io;
|
|
|
|
+ ppc_md.ioremap = iowa_ioremap;
|
|
|
|
+ io_workaround_inited = 1;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* Register new bus to support workaround */
|
|
void __devinit iowa_register_bus(struct pci_controller *phb,
|
|
void __devinit iowa_register_bus(struct pci_controller *phb,
|
|
struct ppc_pci_io *ops,
|
|
struct ppc_pci_io *ops,
|
|
int (*initfunc)(struct iowa_bus *, void *), void *data)
|
|
int (*initfunc)(struct iowa_bus *, void *), void *data)
|
|
@@ -152,6 +164,8 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
|
|
struct iowa_bus *bus;
|
|
struct iowa_bus *bus;
|
|
struct device_node *np = phb->dn;
|
|
struct device_node *np = phb->dn;
|
|
|
|
|
|
|
|
+ io_workaround_init();
|
|
|
|
+
|
|
if (iowa_bus_count >= IOWA_MAX_BUS) {
|
|
if (iowa_bus_count >= IOWA_MAX_BUS) {
|
|
pr_err("IOWA:Too many pci bridges, "
|
|
pr_err("IOWA:Too many pci bridges, "
|
|
"workarounds disabled for %s\n", np->full_name);
|
|
"workarounds disabled for %s\n", np->full_name);
|
|
@@ -171,14 +185,3 @@ void __devinit iowa_register_bus(struct pci_controller *phb,
|
|
pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
|
|
pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
|
|
}
|
|
}
|
|
|
|
|
|
-/* enable IO workaround */
|
|
|
|
-void __devinit io_workaround_init(void)
|
|
|
|
-{
|
|
|
|
- static int io_workaround_inited;
|
|
|
|
-
|
|
|
|
- if (io_workaround_inited)
|
|
|
|
- return;
|
|
|
|
- ppc_pci_io = iowa_pci_io;
|
|
|
|
- ppc_md.ioremap = iowa_ioremap;
|
|
|
|
- io_workaround_inited = 1;
|
|
|
|
-}
|
|
|