diff options
Diffstat (limited to 'arch/powerpc/kernel/rtas_pci.c')
-rw-r--r-- | arch/powerpc/kernel/rtas_pci.c | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index ce230da2c015..73f1934582c2 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -113,7 +113,7 @@ static int rtas_pci_read_config(struct pci_bus *bus, | |||
113 | 113 | ||
114 | ret = rtas_read_config(pdn, where, size, val); | 114 | ret = rtas_read_config(pdn, where, size, val); |
115 | if (*val == EEH_IO_ERROR_VALUE(size) && | 115 | if (*val == EEH_IO_ERROR_VALUE(size) && |
116 | eeh_dev_check_failure(of_node_to_eeh_dev(dn))) | 116 | eeh_dev_check_failure(pdn_to_eeh_dev(pdn))) |
117 | return PCIBIOS_DEVICE_NOT_FOUND; | 117 | return PCIBIOS_DEVICE_NOT_FOUND; |
118 | 118 | ||
119 | return ret; | 119 | return ret; |
@@ -277,50 +277,3 @@ int rtas_setup_phb(struct pci_controller *phb) | |||
277 | 277 | ||
278 | return 0; | 278 | return 0; |
279 | } | 279 | } |
280 | |||
281 | void __init find_and_init_phbs(void) | ||
282 | { | ||
283 | struct device_node *node; | ||
284 | struct pci_controller *phb; | ||
285 | struct device_node *root = of_find_node_by_path("/"); | ||
286 | |||
287 | for_each_child_of_node(root, node) { | ||
288 | if (node->type == NULL || (strcmp(node->type, "pci") != 0 && | ||
289 | strcmp(node->type, "pciex") != 0)) | ||
290 | continue; | ||
291 | |||
292 | phb = pcibios_alloc_controller(node); | ||
293 | if (!phb) | ||
294 | continue; | ||
295 | rtas_setup_phb(phb); | ||
296 | pci_process_bridge_OF_ranges(phb, node, 0); | ||
297 | isa_bridge_find_early(phb); | ||
298 | } | ||
299 | |||
300 | of_node_put(root); | ||
301 | pci_devs_phb_init(); | ||
302 | |||
303 | /* | ||
304 | * PCI_PROBE_ONLY and PCI_REASSIGN_ALL_BUS can be set via properties | ||
305 | * in chosen. | ||
306 | */ | ||
307 | if (of_chosen) { | ||
308 | const int *prop; | ||
309 | |||
310 | prop = of_get_property(of_chosen, | ||
311 | "linux,pci-probe-only", NULL); | ||
312 | if (prop) { | ||
313 | if (*prop) | ||
314 | pci_add_flags(PCI_PROBE_ONLY); | ||
315 | else | ||
316 | pci_clear_flags(PCI_PROBE_ONLY); | ||
317 | } | ||
318 | |||
319 | #ifdef CONFIG_PPC32 /* Will be made generic soon */ | ||
320 | prop = of_get_property(of_chosen, | ||
321 | "linux,pci-assign-all-buses", NULL); | ||
322 | if (prop && *prop) | ||
323 | pci_add_flags(PCI_REASSIGN_ALL_BUS); | ||
324 | #endif /* CONFIG_PPC32 */ | ||
325 | } | ||
326 | } | ||