[POWERPC] Add support for PCI-Express nodes in the device tree
authorJake Moilanen <moilanen@austin.ibm.com>
Wed, 7 Jun 2006 21:05:46 +0000 (16:05 -0500)
committerPaul Mackerras <paulus@samba.org>
Thu, 15 Jun 2006 09:31:25 +0000 (19:31 +1000)
This adds support to recognize the PCIe device_type "pciex" and made
the portdrv buildable.

Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/Kconfig
arch/powerpc/kernel/pci_64.c
arch/powerpc/kernel/rtas_pci.c

index 7eb0ef2b0036cec0a438f424ab0552c1e26b3eef..4ef2478cb84ce908968bf1fa1df3c6b4f5db0f6d 100644 (file)
@@ -853,6 +853,8 @@ config 8260_PCI9_IDMA4
 
 endchoice
 
+source "drivers/pci/pcie/Kconfig"
+
 source "drivers/pci/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
index 30a4e6a1368ac855753cc0f65b910155038ddc87..74dc76653e1bb652989af1659de335a40aec0486 100644 (file)
@@ -388,7 +388,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
 
        dev->current_state = 4;         /* unknown power state */
 
-       if (!strcmp(type, "pci")) {
+       if (!strcmp(type, "pci") || !strcmp(type, "pciex")) {
                /* a PCI-PCI bridge */
                dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
                dev->rom_base_reg = PCI_ROM_ADDRESS1;
index 57b539a03fa963833661855b6c6b40b73c17d727..6eb7e49b394ae7e0302456cfc18486d95a656bf0 100644 (file)
@@ -313,7 +313,9 @@ unsigned long __init find_and_init_phbs(void)
        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)
+
+               if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
+                                          strcmp(node->type, "pciex") != 0))
                        continue;
 
                phb = pcibios_alloc_controller(node);