summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-01-14 15:24:52 +0000
committerWolfgang Denk <wd@denx.de>2012-03-18 21:33:05 +0100
commitc8e66db7893532f2222334e7c36ee841da34ef4c (patch)
treed06eaa23d0da3abe470b3b1df1748697afb1157c /common
parentcd24a6bf2183ac24080e0348e193ba627711fcbc (diff)
downloadu-boot-imx-c8e66db7893532f2222334e7c36ee841da34ef4c.zip
u-boot-imx-c8e66db7893532f2222334e7c36ee841da34ef4c.tar.gz
u-boot-imx-c8e66db7893532f2222334e7c36ee841da34ef4c.tar.bz2
bootstage: Convert net progress numbers to enums
This changes over the network-related progress numbers to use enums from bootstage.h. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_net.c17
-rw-r--r--common/env_common.c2
2 files changed, 10 insertions, 9 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c
index c9f2a08..897b6f6 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -230,36 +230,37 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
break;
#endif
default:
- show_boot_error(80);
+ show_boot_error(BOOTSTAGE_ID_NET_START);
return CMD_RET_USAGE;
}
+ show_boot_progress(BOOTSTAGE_ID_NET_START);
- show_boot_progress(80);
if ((size = NetLoop(proto)) < 0) {
- show_boot_error(81);
+ show_boot_error(BOOTSTAGE_ID_NET_NETLOOP_OK);
return 1;
}
+ show_boot_progress(BOOTSTAGE_ID_NET_NETLOOP_OK);
- show_boot_progress(81);
/* NetLoop ok, update environment */
netboot_update_env();
/* done if no file was loaded (no errors though) */
if (size == 0) {
- show_boot_error(82);
+ show_boot_error(BOOTSTAGE_ID_NET_LOADED);
return 0;
}
/* flush cache */
flush_cache(load_addr, size);
- show_boot_progress(82);
+ show_boot_progress(BOOTSTAGE_ID_NET_LOADED);
+
rcode = bootm_maybe_autostart(cmdtp, argv[0]);
if (rcode < 0)
- show_boot_error(83);
+ show_boot_error(BOOTSTAGE_ID_NET_DONE_ERR);
else
- show_boot_progress(84);
+ show_boot_progress(BOOTSTAGE_ID_NET_DONE);
return rcode;
}
diff --git a/common/env_common.c b/common/env_common.c
index 49b55f1..41e2f26 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -228,7 +228,7 @@ void env_relocate(void)
#if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
set_default_env(NULL);
#else
- show_boot_error(60);
+ show_boot_error(BOOTSTAGE_ID_NET_CHECKSUM);
set_default_env("!bad CRC");
#endif
} else {