From: Jake Moilanen Date: Wed, 7 Jun 2006 21:05:46 +0000 (-0500) Subject: [POWERPC] Add support for PCI-Express nodes in the device tree X-Git-Tag: v2.6.18-rc1~1081^2~225^2~57 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb53bb3dcb12d79efdee3d82bff46a204af377f3;p=linux-2.6 [POWERPC] Add support for PCI-Express nodes in the device tree This adds support to recognize the PCIe device_type "pciex" and made the portdrv buildable. Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 7eb0ef2b00..4ef2478cb8 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -853,6 +853,8 @@ config 8260_PCI9_IDMA4 endchoice +source "drivers/pci/pcie/Kconfig" + source "drivers/pci/Kconfig" source "drivers/pcmcia/Kconfig" diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 30a4e6a136..74dc76653e 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -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; diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 57b539a03f..6eb7e49b39 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c @@ -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);