/*
+ * arch/ppc64/kernel/rtas_pci.c
+ *
* Copyright (C) 2001 Dave Engebretsen, IBM Corporation
* Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
*
struct device_node *node;
struct pci_controller *phb;
unsigned int index;
+ unsigned int root_size_cells = 0;
+ unsigned int *opprop = NULL;
struct device_node *root = of_find_node_by_path("/");
+ if (ppc64_interrupt_controller == IC_OPEN_PIC) {
+ opprop = (unsigned int *)get_property(root,
+ "platform-open-pic", NULL);
+ }
+
+ root_size_cells = prom_n_size_cells(root);
+
index = 0;
+
for (node = of_get_next_child(root, NULL);
node != NULL;
node = of_get_next_child(root, node)) {
-
- if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
- strcmp(node->type, "pciex") != 0))
+ if (node->type == NULL || strcmp(node->type, "pci") != 0)
continue;
phb = pcibios_alloc_controller(node);
setup_phb(node, phb);
pci_process_bridge_OF_ranges(phb, node, 0);
pci_setup_phb_io(phb, index == 0);
+#ifdef CONFIG_PPC_PSERIES
+ /* XXX This code need serious fixing ... --BenH */
+ if (ppc64_interrupt_controller == IC_OPEN_PIC && pSeries_mpic) {
+ int addr = root_size_cells * (index + 2) - 1;
+ mpic_assign_isu(pSeries_mpic, index, opprop[addr]);
+ }
+#endif
index++;
}