Commit 1a982b3e authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Recent firmware removes the compatible property on pci bridges.

parent 577f1d2a
...@@ -878,7 +878,7 @@ prom_initialize_tce_table(void) ...@@ -878,7 +878,7 @@ prom_initialize_tce_table(void)
phandle node; phandle node;
ihandle phb_node; ihandle phb_node;
unsigned long offset = reloc_offset(); 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 i, table = 0;
unsigned long base, vbase, align; unsigned long base, vbase, align;
unsigned int minalign, minsize; unsigned int minalign, minsize;
...@@ -893,16 +893,25 @@ prom_initialize_tce_table(void) ...@@ -893,16 +893,25 @@ prom_initialize_tce_table(void)
for (node = 0; prom_next_node(&node); ) { for (node = 0; prom_next_node(&node); ) {
compatible[0] = 0; compatible[0] = 0;
type[0] = 0; type[0] = 0;
model[0] = 0;
call_prom(RELOC("getprop"), 4, 1, node, RELOC("compatible"), call_prom(RELOC("getprop"), 4, 1, node, RELOC("compatible"),
compatible, sizeof(compatible)); compatible, sizeof(compatible));
call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"), call_prom(RELOC("getprop"), 4, 1, node, RELOC("device_type"),
type, sizeof(type)); type, sizeof(type));
call_prom(RELOC("getprop"), 4, 1, node, RELOC("model"),
model, sizeof(model));
if ((compatible[0] == 0) || /* Keep the old logic in tack to avoid regression. */
((strstr(compatible, RELOC("python")) == NULL) && if (compatible[0] != 0) {
(strstr(compatible, RELOC("Speedwagon")) == NULL))) { if((strstr(compatible, RELOC("python")) == NULL) &&
continue; (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)) { if ((type[0] == 0) || (strstr(type, RELOC("pci")) == NULL)) {
continue; continue;
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
/* #include <linux/openpic.h> */ /* #include <linux/openpic.h> */
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/err.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/atomic.h> #include <asm/atomic.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment