From patchwork Tue Jul 2 11:57:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 256393 X-Patchwork-Delegate: trini@ti.com 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 0B3102C009C for ; Tue, 2 Jul 2013 21:56:33 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 859434A02A; Tue, 2 Jul 2013 13:56:31 +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 AtZx21NM-PPQ; Tue, 2 Jul 2013 13:56:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7DA9E4A02C; Tue, 2 Jul 2013 13:56:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 691924A02C for ; Tue, 2 Jul 2013 13:56:24 +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 q760Ju5ChMyv for ; Tue, 2 Jul 2013 13:56:19 +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-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by theia.denx.de (Postfix) with ESMTPS id 397A54A02A for ; Tue, 2 Jul 2013 13:56:12 +0200 (CEST) Received: by mail-ee0-f50.google.com with SMTP id d49so2632296eek.37 for ; Tue, 02 Jul 2013 04:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=zKYFsfeFr68vbtl3XvKzzIlk2B+Bv1/AVyAJqbHnVWM=; b=ymxapYjBiBRXJ1ZVzcW3RFkHmFXCEmsctU1MOeSxJhVHhbTucggaSebscgerHFqKcT uoZj1hQ8IWxXd94wPv1Yk1TU93UIirGu49FgsPaNPuLo/d7iG0KltohZ2rO+bb52p8ZW VjVY8i2PX5yn3ZF+L3ACy6YCRiVBbrsU2Sj5WpJwW3OahM44ynUmJVoa3s/ePhHT0d0Q pSjf8Q1LyMcWolcX9pqbFhtGyC2gVaWQPTTCGcsAZl510zbJidiUzvEAdLyLvH1aEjF0 FPGNmxqYncw7JXyZrVZltQAwD2L17684KkPufdHn9uA78ZBK/RS7Q3dzgZJE9Lv84lTX kYUA== X-Received: by 10.15.102.68 with SMTP id bq44mr25879904eeb.89.1372766170968; Tue, 02 Jul 2013 04:56:10 -0700 (PDT) Received: from localhost ([2a01:198:47b:1:210:75ff:fe1a:cd1e]) by mx.google.com with ESMTPSA id l42sm36126483eeo.14.2013.07.02.04.56.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Jul 2013 04:56:10 -0700 (PDT) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: u-boot@lists.denx.de Date: Tue, 2 Jul 2013 13:57:44 +0200 Message-Id: <1372766264-15691-1-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Subject: [U-Boot] [PATCH] avr32: fix do_bootm_linux 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before calling it again with flag set to BOOTM_STATE_OS_GO. Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will require a complete refactoring later on. Signed-off-by: Andreas Bießmann --- arch/avr32/lib/bootm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c index 87f3f9c..eedab9d 100644 --- a/arch/avr32/lib/bootm.c +++ b/arch/avr32/lib/bootm.c @@ -187,6 +187,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima struct tag *params, *params_start; char *commandline = getenv("bootargs"); + /* + * allow the PREP bootm subcommand, it is required for bootm to work + * + * TODO: Andreas Bießmann refactor the + * do_bootm_linux() for avr32 + */ + if (flag & BOOTM_STATE_OS_PREP) + return 0; + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1;