]> git.neil.brown.name Git - history.git/commitdiff
ppc64: Recent firmware removes the compatible property on pci bridges.
authorAnton Blanchard <anton@samba.org>
Fri, 31 May 2002 20:56:13 +0000 (06:56 +1000)
committerAnton Blanchard <anton@samba.org>
Fri, 31 May 2002 20:56:13 +0000 (06:56 +1000)
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/smp.c

index 6aaaccea986a8b3cf128be6aaa12f58686ea090b..70b1dc4e457cb900f6e53853bae4d571cb0777a2 100644 (file)
@@ -878,7 +878,7 @@ prom_initialize_tce_table(void)
        phandle node;
        ihandle phb_node;
         unsigned long offset = reloc_offset();
-       char compatible[64], path[64], type[64];
+       char compatible[64], path[64], type[64], model[64];
        unsigned long i, table = 0;
        unsigned long base, vbase, align;
        unsigned int minalign, minsize;
@@ -893,16 +893,25 @@ prom_initialize_tce_table(void)
        for (node = 0; prom_next_node(&node); ) {
                compatible[0] = 0;
                type[0] = 0;
+               model[0] = 0;
                call_prom(RELOC("getprop"), 4, 1, node, RELOC("compatible"),
                          compatible, sizeof(compatible));
                call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
                          type, sizeof(type));
+               call_prom(RELOC("getprop"), 4, 1, node, RELOC("model"),
+                         model, sizeof(model));
 
-               if ((compatible[0] == 0) ||
-                  ((strstr(compatible, RELOC("python")) == NULL) &&
-                   (strstr(compatible, RELOC("Speedwagon")) == NULL))) {
-                       continue;
+               /* Keep the old logic in tack to avoid regression. */
+               if (compatible[0] != 0) {
+                       if((strstr(compatible, RELOC("python")) == NULL) &&
+                          (strstr(compatible, RELOC("Speedwagon")) == NULL))
+                               continue;
+               } else if (model[0] != 0) {
+                       if ((strstr(model, RELOC("ython")) == NULL) &&
+                           (strstr(model, RELOC("peedwagon")) == NULL))
+                               continue;
                }
+
                if ((type[0] == 0) || (strstr(type, RELOC("pci")) == NULL)) {
                        continue;
                }
index 836804e5d7b9115bafe542eacd4d354d9d263868..2ff11a4437e3de2a5657ce73d700dd977e323541 100644 (file)
@@ -31,6 +31,7 @@
 /* #include <linux/openpic.h> */
 #include <linux/spinlock.h>
 #include <linux/cache.h>
+#include <linux/err.h>
 
 #include <asm/ptrace.h>
 #include <asm/atomic.h>