diff options
author | Nathan Lynch <ntl@pobox.com> | 2007-01-03 13:56:28 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-01-24 05:13:58 -0500 |
commit | f1f003330b4489f0e6502e1315bf9d764ed5f757 (patch) | |
tree | 84a9b5bac5ea65db00a4857a91fa2a5cf10d96a7 | |
parent | 9a3d6458e9dded0a060115b446531cfc77083ebb (diff) |
[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>
-rw-r--r-- | arch/powerpc/platforms/maple/pci.c | 15 |
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) | |||
560 | return; | 560 | return; |
561 | } | 561 | } |
562 | for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { | 562 | for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { |
563 | if (np->name == NULL) | 563 | if (!np->type) |
564 | continue; | 564 | continue; |
565 | if (!strcmp(np->name, "pci") || !strcmp(np->name, "pcie")) { | 565 | if (strcmp(np->type, "pci") && strcmp(np->type, "ht")) |
566 | if (add_bridge(np) == 0) | 566 | continue; |
567 | of_node_get(np); | 567 | if ((device_is_compatible(np, "u4-pcie") || |
568 | } | 568 | device_is_compatible(np, "u3-agp")) && |
569 | if (strcmp(np->name, "ht") == 0) { | 569 | add_bridge(np) == 0) |
570 | of_node_get(np); | ||
571 | |||
572 | if (device_is_compatible(np, "u3-ht")) { | ||
570 | of_node_get(np); | 573 | of_node_get(np); |
571 | ht = np; | 574 | ht = np; |
572 | } | 575 | } |