]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common/cmd_fdt.c: fix wrong data displayed in fdt print
authorHaojian Zhuang <haojian.zhuang@gmail.com>
Sun, 22 May 2011 21:53:30 +0000 (21:53 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 1 Jun 2011 20:44:50 +0000 (22:44 +0200)
All data in dtb is big endian. Some ARM devices are little-endian.
In print_data(), it displays data with big-endian format. For ARM device,
data should be converted to little-endian first.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Gerald Van Baren <vanbaren@cideas.com>
common/cmd_fdt.c

index 3d0c2b772c95cfed8f95196d0d6c511f60a7c57b..9bdeccaa4068a59f511fa617bf0d7ae2d3297822 100644 (file)
@@ -665,7 +665,7 @@ static void print_data(const void *data, int len)
 
                printf("<");
                for (j = 0, p = data; j < len/4; j ++)
-                       printf("0x%x%s", p[j], j < (len/4 - 1) ? " " : "");
+                       printf("0x%x%s", fdt32_to_cpu(p[j]), j < (len/4 - 1) ? " " : "");
                printf(">");
        } else { /* anything else... hexdump */
                const u8 *s;