]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/common/fdt.c
upgrade to upstream version 2013.07
[karo-tx-uboot.git] / board / karo / common / fdt.c
index d0e49ff7bd2ae2d65ff61aeabcaadbbd8ba39c4e..76b8b7882a5226c9a0a6a7a54faeccd0a6eb6d3d 100644 (file)
@@ -368,13 +368,13 @@ static int karo_fdt_find_video_timings(void *blob)
        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;
 }
@@ -391,7 +391,7 @@ int karo_fdt_get_fb_mode(void *blob, const char *name, struct fb_videomode *fb_m
 
                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);
@@ -439,7 +439,7 @@ int karo_fdt_update_fb_mode(void *blob, const char *name)
 
        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;
@@ -448,7 +448,7 @@ int karo_fdt_update_fb_mode(void *blob, const char *name)
                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);
@@ -489,6 +489,7 @@ static int karo_load_part(const char *part, void *addr, size_t len)
        struct mtd_device *dev;
        struct part_info *part_info;
        u8 part_num;
+       size_t actual;
 
        debug("Initializing mtd_parts\n");
        ret = mtdparts_init();
@@ -512,11 +513,16 @@ static int karo_load_part(const char *part, void *addr, size_t len)
                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;