summaryrefslogtreecommitdiff
path: root/common/cmd_doc.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-07-06 01:15:17 +0200
committerWolfgang Denk <wd@denx.de>2008-07-06 01:15:17 +0200
commitd86a0a6f7fe433787edf06aecba9fd6abfecab48 (patch)
tree005ba8a000e7bdcab42c1df6339bf7e51dcda2ca /common/cmd_doc.c
parenta524e112b424c6843800ea2f19d3a8cf01d0aa94 (diff)
parentf492dd636fbbae529e17533995bc6e5813c007f6 (diff)
downloadu-boot-imx-d86a0a6f7fe433787edf06aecba9fd6abfecab48.zip
u-boot-imx-d86a0a6f7fe433787edf06aecba9fd6abfecab48.tar.gz
u-boot-imx-d86a0a6f7fe433787edf06aecba9fd6abfecab48.tar.bz2
Merge branch 'master' of ssh+git://mercury.denx.de/home/wd/git/u-boot/master
Conflicts: board/amirix/ap1000/serial.c board/exbitgen/exbitgen.c board/exbitgen/flash.c board/ml2/serial.c board/xilinx/ml300/serial.c Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/cmd_doc.c')
-rw-r--r--common/cmd_doc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/common/cmd_doc.c b/common/cmd_doc.c
index 83aba37..d7b2f53 100644
--- a/common/cmd_doc.c
+++ b/common/cmd_doc.c
@@ -206,7 +206,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
image_header_t *hdr;
int rcode = 0;
#if defined(CONFIG_FIT)
- const void *fit_hdr;
+ const void *fit_hdr = NULL;
#endif
show_boot_progress (34);
@@ -275,12 +275,6 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = (const void *)addr;
- if (!fit_check_format (fit_hdr)) {
- show_boot_progress (-130);
- puts ("** Bad FIT image format\n");
- return 1;
- }
- show_boot_progress (131);
puts ("Fit image detected...\n");
cnt = fit_get_size (fit_hdr);
@@ -304,8 +298,15 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if defined(CONFIG_FIT)
/* This cannot be done earlier, we need complete FIT image in RAM first */
- if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
- fit_print_contents ((const void *)addr);
+ if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) {
+ if (!fit_check_format (fit_hdr)) {
+ show_boot_progress (-130);
+ puts ("** Bad FIT image format\n");
+ return 1;
+ }
+ show_boot_progress (131);
+ fit_print_contents (fit_hdr);
+ }
#endif
/* Loading ok, update default load address */