summaryrefslogtreecommitdiff
path: root/board/ifm/ac14xx
diff options
context:
space:
mode:
authorGerhard Sittig <gsi@denx.de>2013-06-05 14:51:08 +0200
committerWolfgang Denk <wd@denx.de>2013-06-24 22:26:57 +0200
commit14d4c5f39ed24df2fba6e60d1e1c89f66d419345 (patch)
treee87057ef13e97dd46b7fa5ef1dc1a7bcc70b146d /board/ifm/ac14xx
parent527a1c71fbe264be9b37c3c2a9d992ea1ee91390 (diff)
downloadu-boot-imx-14d4c5f39ed24df2fba6e60d1e1c89f66d419345.zip
u-boot-imx-14d4c5f39ed24df2fba6e60d1e1c89f66d419345.tar.gz
u-boot-imx-14d4c5f39ed24df2fba6e60d1e1c89f66d419345.tar.bz2
ac14xx: re-order the recovery condition checks
re-order the conditions which make the recovery system startup: combine those conditions which were explicitly initiated (key press, software request) and those which post-process error conditions (installer issues) Signed-off-by: Gerhard Sittig <gsi@denx.de>
Diffstat (limited to 'board/ifm/ac14xx')
-rw-r--r--board/ifm/ac14xx/ac14xx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/board/ifm/ac14xx/ac14xx.c b/board/ifm/ac14xx/ac14xx.c
index c8e88cc..dc2aff0 100644
--- a/board/ifm/ac14xx/ac14xx.c
+++ b/board/ifm/ac14xx/ac14xx.c
@@ -336,8 +336,8 @@ int misc_init_r(void)
/*
* enforce the start of the recovery system when
* - the appropriate keys were pressed
- * - a previous installation was aborted or has failed
* - "some" external software told us to
+ * - a previous installation was aborted or has failed
*/
want_recovery = 0;
keys = gpio_querykbd();
@@ -347,6 +347,11 @@ int misc_init_r(void)
printf("detected recovery request (keyboard)\n");
want_recovery = 1;
}
+ s = getenv("want_recovery");
+ if ((s != NULL) && (*s != '\0')) {
+ printf("detected recovery request (environment)\n");
+ want_recovery = 1;
+ }
s = getenv("install_in_progress");
if ((s != NULL) && (*s != '\0')) {
printf("previous installation has not completed\n");
@@ -357,11 +362,6 @@ int misc_init_r(void)
printf("previous installation has failed\n");
want_recovery = 1;
}
- s = getenv("want_recovery");
- if ((s != NULL) && (*s != '\0')) {
- printf("detected recovery request (environment)\n");
- want_recovery = 1;
- }
if (want_recovery) {
printf("enforced start of the recovery system\n");
setenv("bootcmd", "run recovery");