From patchwork Wed Jun 5 12:51:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerhard Sittig X-Patchwork-Id: 249029 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C7FAF2C0099 for ; Wed, 5 Jun 2013 22:52:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A8A7E4A139; Wed, 5 Jun 2013 14:52:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gLWYFOSWVfh7; Wed, 5 Jun 2013 14:52:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A111F4A141; Wed, 5 Jun 2013 14:52:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 53BF64A124 for ; Wed, 5 Jun 2013 14:52:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XcrBHL4VQtMS for ; Wed, 5 Jun 2013 14:52:00 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id 345FA4A101 for ; Wed, 5 Jun 2013 14:52:00 +0200 (CEST) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3bQVJH4Yk2z3hhZN; Wed, 5 Jun 2013 14:51:59 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3bQVJH4Ljzzbbg0; Wed, 5 Jun 2013 14:51:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id NLpN2WkMpV04; Wed, 5 Jun 2013 14:51:58 +0200 (CEST) X-Auth-Info: IQg6o0GIF+HQqho1SpIAUxQjS/8Qh2Jwm1xYTTvpvTM= Received: from localhost (kons-4d027c2c.pool.mediaWays.net [77.2.124.44]) by mail.mnet-online.de (Postfix) with ESMTPA; Wed, 5 Jun 2013 14:51:57 +0200 (CEST) From: Gerhard Sittig To: U-Boot@lists.denx.de Date: Wed, 5 Jun 2013 14:51:08 +0200 Message-Id: <1370436671-12422-5-git-send-email-gsi@denx.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1370436671-12422-1-git-send-email-gsi@denx.de> References: <1370257851-27583-1-git-send-email-gsi@denx.de> <1370436671-12422-1-git-send-email-gsi@denx.de> Subject: [U-Boot] [PATCH v2 4/7] ac14xx: re-order the recovery condition checks X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- board/ifm/ac14xx/ac14xx.c | 12 ++++++------ 1 file 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");