Skip to content
Snippets Groups Projects
Commit 89c8757d authored by Gerald Van Baren's avatar Gerald Van Baren
Browse files

Fix bugs in the CONFIG_OF_LIBFDT


Stupid coding mistakes (identified by Timur Tabi, thanks).

Signed-off-by: default avatarGerald Van Baren <vanbaren@cideas.com>
parent 6be07cc1
No related branches found
No related tags found
No related merge requests found
...@@ -788,7 +788,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, ...@@ -788,7 +788,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
return; return;
} }
#if defined(CONFIG_OF_LIBFDT) #if defined(CONFIG_OF_LIBFDT)
if (fdt_check_header(of_flat_tree + sizeof(image_header_t)) == 0) { if (fdt_check_header(of_flat_tree + sizeof(image_header_t)) != 0) {
#else #else
if (*((ulong *)(of_flat_tree + sizeof(image_header_t))) != OF_DT_HEADER) { if (*((ulong *)(of_flat_tree + sizeof(image_header_t))) != OF_DT_HEADER) {
#endif #endif
...@@ -944,7 +944,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, ...@@ -944,7 +944,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
of_flat_tree = (char *)of_start; of_flat_tree = (char *)of_start;
printf (" Loading Device Tree to %08lx, end %08lx ... ", printf (" Loading Device Tree to %08lx, end %08lx ... ",
of_start, of_start + of_len - 1); of_start, of_start + of_len - 1);
err = fdt_open_into((void *)of_start, (void *)of_data, of_len); err = fdt_open_into((void *)of_data, (void *)of_start, of_len);
if (err != 0) { if (err != 0) {
printf ("libfdt: %s " __FILE__ " %d\n", fdt_strerror(err), __LINE__); printf ("libfdt: %s " __FILE__ " %d\n", fdt_strerror(err), __LINE__);
} }
......
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