summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorGerald Van Baren <vanbaren@cideas.com>2007-05-08 21:27:35 -0400
committerGerald Van Baren <vanbaren@cideas.com>2007-08-10 19:21:35 -0400
commit89c8757d8f213c47709bdc4efe0695263a6080a6 (patch)
tree1a231019ff51e34085b8baf0883b5e0b1fa5bc62 /common
parent6be07cc1ca458278c85ecdbf1a0536cff4c701ec (diff)
downloadu-boot-imx-89c8757d8f213c47709bdc4efe0695263a6080a6.zip
u-boot-imx-89c8757d8f213c47709bdc4efe0695263a6080a6.tar.gz
u-boot-imx-89c8757d8f213c47709bdc4efe0695263a6080a6.tar.bz2
Fix bugs in the CONFIG_OF_LIBFDT
Stupid coding mistakes (identified by Timur Tabi, thanks). Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 2436581..1cb0e43 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -788,7 +788,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
return;
}
#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
if (*((ulong *)(of_flat_tree + sizeof(image_header_t))) != OF_DT_HEADER) {
#endif
@@ -944,7 +944,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
of_flat_tree = (char *)of_start;
printf (" Loading Device Tree to %08lx, end %08lx ... ",
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) {
printf ("libfdt: %s " __FILE__ " %d\n", fdt_strerror(err), __LINE__);
}