const char *subnode = "display-timings";
if (off < 0) {
- printf("Could not find node 'display' in FDT: %d\n", off);
+ debug("Could not find node 'display' in FDT: %d\n", off);
return off;
}
off = fdt_subnode_offset(blob, off, subnode);
if (off < 0) {
- printf("Could not find node '%s' in FDT: %d\n", subnode, off);
+ debug("Could not find node '%s' in FDT: %d\n", subnode, off);
}
return off;
}
off = fdt_next_node(blob, off, &d);
if (d > 2) {
- printf("Skipping node @ %04x %s depth %d\n", off, fdt_get_name(blob, off, NULL), d);
+ debug("Skipping node @ %04x %s depth %d\n", off, fdt_get_name(blob, off, NULL), d);
continue;
}
debug("parsing subnode @ %04x %s depth %d\n", off, fdt_get_name(blob, off, NULL), d);
off = fdt_subnode_offset(blob, off, subnode);
if (off < 0) {
- printf("Could not find node '%s' in FDT: %d\n", subnode, off);
+ debug("Could not find node '%s' in FDT: %d\n", subnode, off);
}
do {
const char *n, *endp;
int do_del;
if (d > 2) {
- printf("Skipping node @ %04x %s depth %d\n", node, fdt_get_name(blob, node, NULL), d);
+ debug("Skipping node @ %04x %s depth %d\n", node, fdt_get_name(blob, node, NULL), d);
continue;
}
debug("parsing subnode @ %04x %s depth %d\n", node, fdt_get_name(blob, node, NULL), d);
struct mtd_device *dev;
struct part_info *part_info;
u8 part_num;
+ size_t actual;
debug("Initializing mtd_parts\n");
ret = mtdparts_init();
len = part_info->size;
}
debug("Reading NAND partition '%s' to %p\n", part, addr);
- ret = nand_read_skip_bad(&nand_info[0], part_info->offset, &len, addr);
+ ret = nand_read_skip_bad(&nand_info[0], part_info->offset, &len,
+ &actual, len, addr);
if (ret) {
printf("Failed to load partition '%s' to %p\n", part, addr);
return ret;
}
+ if (actual < len)
+ printf("Read only %u of %u bytes due to bad blocks\n",
+ actual, len);
+
debug("Read %u byte from partition '%s' @ offset %08x\n",
len, part, part_info->offset);
return 0;