aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/maple
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2007-01-03 12:56:28 -0600
committerPaul Mackerras <paulus@samba.org>2007-01-24 21:13:58 +1100
commitf1f003330b4489f0e6502e1315bf9d764ed5f757 (patch)
tree84a9b5bac5ea65db00a4857a91fa2a5cf10d96a7 /arch/powerpc/platforms/maple
parent[POWERPC] Add support for R_PPC_ADDR16_HI relocations (diff)
downloadlinux-dev-f1f003330b4489f0e6502e1315bf9d764ed5f757.tar.xz
linux-dev-f1f003330b4489f0e6502e1315bf9d764ed5f757.zip
[POWERPC] maple: improve CPC9x5 host bridge detection
Identify CPC9x5 PCI Express, AGP, and HT host bridges using device_type and compatible properties, which is a more flexible method than using the name property (which can differ between firmwares and models). Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/maple')
-rw-r--r--arch/powerpc/platforms/maple/pci.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 3f6a69f67195..011f0f14f0f2 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -560,13 +560,16 @@ void __init maple_pci_init(void)
return;
}
for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) {
- if (np->name == NULL)
+ if (!np->type)
continue;
- if (!strcmp(np->name, "pci") || !strcmp(np->name, "pcie")) {
- if (add_bridge(np) == 0)
- of_node_get(np);
- }
- if (strcmp(np->name, "ht") == 0) {
+ if (strcmp(np->type, "pci") && strcmp(np->type, "ht"))
+ continue;
+ if ((device_is_compatible(np, "u4-pcie") ||
+ device_is_compatible(np, "u3-agp")) &&
+ add_bridge(np) == 0)
+ of_node_get(np);
+
+ if (device_is_compatible(np, "u3-ht")) {
of_node_get(np);
ht = np;
}