From patchwork Sat May 14 21:42:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 622294 X-Patchwork-Delegate: andreas.biessmann@googlemail.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 3r6gDs3xWQz9t5c for ; Sun, 15 May 2016 07:42:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 30379A765F; Sat, 14 May 2016 23:42:36 +0200 (CEST) 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 jf37ECwmkQDO; Sat, 14 May 2016 23:42:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 55D20A7534; Sat, 14 May 2016 23:42:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C8B6A7534 for ; Sat, 14 May 2016 23:42:32 +0200 (CEST) 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 MApPWI72MSFw for ; Sat, 14 May 2016 23:42:32 +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.9]) by theia.denx.de (Postfix) with ESMTPS id 24FC6A751B for ; Sat, 14 May 2016 23:42:32 +0200 (CEST) Received: from mail.nefkom.net (unknown [192.168.8.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3r6gDl6dzKz3hjF8; Sat, 14 May 2016 23:42:31 +0200 (CEST) X-Auth-Info: 5OvEU2XYye9D1H47pFpN9fvco6D+Ps+IY+5lx9n3tD4= Received: from chi.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3r6gDl3T0CzvdWS; Sat, 14 May 2016 23:42:31 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Sat, 14 May 2016 23:42:28 +0200 Message-Id: <1463262148-8858-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 2.7.0 MIME-Version: 1.0 Cc: Marek Vasut Subject: [U-Boot] [PATCH] ARM: at91: Don't invoke spl_boot_device() twice X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since the spl_boot_mode() is now passed the boot device to boot from, make use of it instead of inquiring for the boot device again. This allows board_boot_order() to function correctly. Signed-off-by: Marek Vasut Cc: Andreas Bießmann Reviewed-by: Andreas Bießmann --- arch/arm/mach-at91/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c index 561cf5f..236c8ec 100644 --- a/arch/arm/mach-at91/spl.c +++ b/arch/arm/mach-at91/spl.c @@ -72,7 +72,7 @@ u32 spl_boot_device(void) u32 spl_boot_mode(const u32 boot_device) { - switch (spl_boot_device()) { + switch (boot_device) { #ifdef CONFIG_SYS_USE_MMC case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: