for (i = 0; i < node_info_size; i++) {
idx = 0;
- noff = fdt_node_offset_by_compatible(blob, -1,
- node_info[i].compat);
- while (noff != -FDT_ERR_NOTFOUND) {
+ noff = -1;
+
+ while ((noff = fdt_node_offset_by_compatible(blob, noff,
+ node_info[i].compat)) >= 0) {
+ const char *prop;
+
+ prop = fdt_getprop(blob, noff, "status", NULL);
+ if (prop && !strcmp(prop, "disabled"))
+ continue;
+
debug("%s: %s, mtd dev type %d\n",
fdt_get_name(blob, noff, 0),
node_info[i].compat, node_info[i].type);
if (fdt_node_set_part_info(blob, noff, dev))
return; /* return on error */
}
-
- /* Jump to next flash node */
- noff = fdt_node_offset_by_compatible(blob, noff,
- node_info[i].compat);
}
}
}