Re: [U-Boot] [PATCH v3 10/15] bootstage: Convert FIT progress numbers to enums

2012-03-18 Thread Wolfgang Denk
Dear Simon Glass,

In message 1326590698-7767-11-git-send-email-...@chromium.org you wrote:
 This changes over all the FIT image progress numbers to use enums
 from bootstage.h.
 
 Signed-off-by: Simon Glass s...@chromium.org
 ---
 
  common/cmd_bootm.c  |   44 ++--
  common/image.c  |   36 
  include/bootstage.h |   38 ++
  3 files changed, 80 insertions(+), 38 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 10/15] bootstage: Convert FIT progress numbers to enums

2012-01-14 Thread Simon Glass
This changes over all the FIT image progress numbers to use enums
from bootstage.h.

Signed-off-by: Simon Glass s...@chromium.org
---

 common/cmd_bootm.c  |   44 ++--
 common/image.c  |   36 
 include/bootstage.h |   38 ++
 3 files changed, 80 insertions(+), 38 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 9ab1c61..44a9ded 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -222,21 +222,21 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[]
if (fit_image_get_type(images.fit_hdr_os,
images.fit_noffset_os, 
images.os.type)) {
puts(Can't get image type!\n);
-   show_boot_error(109);
+   show_boot_error(BOOTSTAGE_ID_FIT_TYPE);
return 1;
}
 
if (fit_image_get_comp(images.fit_hdr_os,
images.fit_noffset_os, 
images.os.comp)) {
puts(Can't get image compression!\n);
-   show_boot_error(110);
+   show_boot_error(BOOTSTAGE_ID_FIT_COMPRESSION);
return 1;
}
 
if (fit_image_get_os(images.fit_hdr_os,
images.fit_noffset_os, images.os.os)) {
puts(Can't get image OS!\n);
-   show_boot_error(111);
+   show_boot_error(BOOTSTAGE_ID_FIT_OS);
return 1;
}
 
@@ -245,7 +245,7 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[]
if (fit_image_get_load(images.fit_hdr_os, images.fit_noffset_os,
images.os.load)) {
puts(Can't get image load address!\n);
-   show_boot_error(112);
+   show_boot_error(BOOTSTAGE_ID_FIT_LOADADDR);
return 1;
}
break;
@@ -648,7 +648,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
} else {
puts(ERROR: new format image overwritten - 
must RESET the board to recover\n);
-   show_boot_error(113);
+   show_boot_error(BOOTSTAGE_ID_OVERWRITTEN);
do_reset(cmdtp, flag, argc, argv);
}
}
@@ -789,28 +789,28 @@ static int fit_check_kernel(const void *fit, int 
os_noffset, int verify)
puts(   Verifying Hash Integrity ... );
if (!fit_image_check_hashes(fit, os_noffset)) {
puts(Bad Data Hash\n);
-   show_boot_error(104);
+   show_boot_error(BOOTSTAGE_ID_FIT_CHECK_HASH);
return 0;
}
puts(OK\n);
}
-   show_boot_progress(105);
+   show_boot_progress(BOOTSTAGE_ID_FIT_CHECK_ARCH);
 
if (!fit_image_check_target_arch(fit, os_noffset)) {
puts(Unsupported Architecture\n);
-   show_boot_error(105);
+   show_boot_error(BOOTSTAGE_ID_FIT_CHECK_ARCH);
return 0;
}
 
-   show_boot_progress(106);
+   show_boot_progress(BOOTSTAGE_ID_FIT_CHECK_KERNEL);
if (!fit_image_check_type(fit, os_noffset, IH_TYPE_KERNEL) 
!fit_image_check_type(fit, os_noffset, IH_TYPE_KERNEL_NOLOAD)) {
puts(Not a kernel image\n);
-   show_boot_error(106);
+   show_boot_error(BOOTSTAGE_ID_FIT_CHECK_KERNEL);
return 0;
}
 
-   show_boot_progress(107);
+   show_boot_progress(BOOTSTAGE_ID_FIT_CHECKED);
return 1;
 }
 #endif /* CONFIG_FIT */
@@ -921,10 +921,10 @@ static void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, 
int argc,
 
if (!fit_check_format(fit_hdr)) {
puts(Bad FIT kernel image format!\n);
-   show_boot_error(100);
+   show_boot_error(BOOTSTAGE_ID_FIT_FORMAT);
return NULL;
}
-   show_boot_progress(100);
+   show_boot_progress(BOOTSTAGE_ID_FIT_FORMAT);
 
if (!fit_uname_kernel) {
/*
@@ -933,11 +933,11 @@ static void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, 
int argc,
 * fit_conf_get_node() will try to find default config
 * node
 */
-   show_boot_progress(101);
+   show_boot_progress(BOOTSTAGE_ID_FIT_NO_UNIT_NAME);