diff options
Diffstat (limited to 'arch/powerpc/kernel/pci_dn.c')
-rw-r--r-- | arch/powerpc/kernel/pci_dn.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 1c67de52e3ce..d5e36e5dc7c2 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
29 | #include <asm/pci-bridge.h> | 29 | #include <asm/pci-bridge.h> |
30 | #include <asm/pSeries_reconfig.h> | ||
31 | #include <asm/ppc-pci.h> | 30 | #include <asm/ppc-pci.h> |
32 | #include <asm/firmware.h> | 31 | #include <asm/firmware.h> |
33 | 32 | ||
@@ -35,7 +34,7 @@ | |||
35 | * Traverse_func that inits the PCI fields of the device node. | 34 | * Traverse_func that inits the PCI fields of the device node. |
36 | * NOTE: this *must* be done before read/write config to the device. | 35 | * NOTE: this *must* be done before read/write config to the device. |
37 | */ | 36 | */ |
38 | static void * __devinit update_dn_pci_info(struct device_node *dn, void *data) | 37 | void * __devinit update_dn_pci_info(struct device_node *dn, void *data) |
39 | { | 38 | { |
40 | struct pci_controller *phb = data; | 39 | struct pci_controller *phb = data; |
41 | const int *type = | 40 | const int *type = |
@@ -184,29 +183,6 @@ struct device_node *fetch_dev_dn(struct pci_dev *dev) | |||
184 | } | 183 | } |
185 | EXPORT_SYMBOL(fetch_dev_dn); | 184 | EXPORT_SYMBOL(fetch_dev_dn); |
186 | 185 | ||
187 | static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) | ||
188 | { | ||
189 | struct device_node *np = node; | ||
190 | struct pci_dn *pci = NULL; | ||
191 | int err = NOTIFY_OK; | ||
192 | |||
193 | switch (action) { | ||
194 | case PSERIES_RECONFIG_ADD: | ||
195 | pci = np->parent->data; | ||
196 | if (pci) | ||
197 | update_dn_pci_info(np, pci->phb); | ||
198 | break; | ||
199 | default: | ||
200 | err = NOTIFY_DONE; | ||
201 | break; | ||
202 | } | ||
203 | return err; | ||
204 | } | ||
205 | |||
206 | static struct notifier_block pci_dn_reconfig_nb = { | ||
207 | .notifier_call = pci_dn_reconfig_notifier, | ||
208 | }; | ||
209 | |||
210 | /** | 186 | /** |
211 | * pci_devs_phb_init - Initialize phbs and pci devs under them. | 187 | * pci_devs_phb_init - Initialize phbs and pci devs under them. |
212 | * | 188 | * |
@@ -223,6 +199,4 @@ void __init pci_devs_phb_init(void) | |||
223 | /* This must be done first so the device nodes have valid pci info! */ | 199 | /* This must be done first so the device nodes have valid pci info! */ |
224 | list_for_each_entry_safe(phb, tmp, &hose_list, list_node) | 200 | list_for_each_entry_safe(phb, tmp, &hose_list, list_node) |
225 | pci_devs_phb_init_dynamic(phb); | 201 | pci_devs_phb_init_dynamic(phb); |
226 | |||
227 | pSeries_reconfig_notifier_register(&pci_dn_reconfig_nb); | ||
228 | } | 202 | } |