Skip to content
Snippets Groups Projects
Commit b7900362 authored by Haojian Zhuang's avatar Haojian Zhuang Committed by Wolfgang Denk
Browse files

common/cmd_fdt.c: fix wrong data displayed in fdt print


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: default avatarHaojian Zhuang <haojian.zhuang@marvell.com>
Cc: Gerald Van Baren <vanbaren@cideas.com>
parent d6840e3d
No related branches found
No related tags found
No related merge requests found
...@@ -665,7 +665,7 @@ static void print_data(const void *data, int len) ...@@ -665,7 +665,7 @@ static void print_data(const void *data, int len)
printf("<"); printf("<");
for (j = 0, p = data; j < len/4; j ++) 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(">"); printf(">");
} else { /* anything else... hexdump */ } else { /* anything else... hexdump */
const u8 *s; const u8 *s;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment