|
@@ -27,7 +27,6 @@
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
#include <asm/prom.h>
|
|
#include <asm/prom.h>
|
|
#include <asm/pci-bridge.h>
|
|
#include <asm/pci-bridge.h>
|
|
-#include <asm/pSeries_reconfig.h>
|
|
|
|
#include <asm/ppc-pci.h>
|
|
#include <asm/ppc-pci.h>
|
|
#include <asm/firmware.h>
|
|
#include <asm/firmware.h>
|
|
|
|
|
|
@@ -35,7 +34,7 @@
|
|
* Traverse_func that inits the PCI fields of the device node.
|
|
* Traverse_func that inits the PCI fields of the device node.
|
|
* NOTE: this *must* be done before read/write config to the device.
|
|
* NOTE: this *must* be done before read/write config to the device.
|
|
*/
|
|
*/
|
|
-static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
|
|
|
|
|
|
+void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
|
|
{
|
|
{
|
|
struct pci_controller *phb = data;
|
|
struct pci_controller *phb = data;
|
|
const int *type =
|
|
const int *type =
|
|
@@ -184,29 +183,6 @@ struct device_node *fetch_dev_dn(struct pci_dev *dev)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(fetch_dev_dn);
|
|
EXPORT_SYMBOL(fetch_dev_dn);
|
|
|
|
|
|
-static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
|
|
|
|
-{
|
|
|
|
- struct device_node *np = node;
|
|
|
|
- struct pci_dn *pci = NULL;
|
|
|
|
- int err = NOTIFY_OK;
|
|
|
|
-
|
|
|
|
- switch (action) {
|
|
|
|
- case PSERIES_RECONFIG_ADD:
|
|
|
|
- pci = np->parent->data;
|
|
|
|
- if (pci)
|
|
|
|
- update_dn_pci_info(np, pci->phb);
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- err = NOTIFY_DONE;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- return err;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static struct notifier_block pci_dn_reconfig_nb = {
|
|
|
|
- .notifier_call = pci_dn_reconfig_notifier,
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* pci_devs_phb_init - Initialize phbs and pci devs under them.
|
|
* pci_devs_phb_init - Initialize phbs and pci devs under them.
|
|
*
|
|
*
|
|
@@ -223,6 +199,4 @@ void __init pci_devs_phb_init(void)
|
|
/* This must be done first so the device nodes have valid pci info! */
|
|
/* This must be done first so the device nodes have valid pci info! */
|
|
list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
|
|
list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
|
|
pci_devs_phb_init_dynamic(phb);
|
|
pci_devs_phb_init_dynamic(phb);
|
|
-
|
|
|
|
- pSeries_reconfig_notifier_register(&pci_dn_reconfig_nb);
|
|
|
|
}
|
|
}
|