From patchwork Mon Oct 21 11:14:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 1180495 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46xYwF3WxXz9sP6 for ; Mon, 21 Oct 2019 22:15:41 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 7722BC21DF3; Mon, 21 Oct 2019 11:15:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 70DB8C21C93; Mon, 21 Oct 2019 11:15:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1B1FDC21C93; Mon, 21 Oct 2019 11:15:30 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id BCE02C21C29 for ; Mon, 21 Oct 2019 11:15:29 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46xYw13pRVz1rVDx; Mon, 21 Oct 2019 13:15:29 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46xYw13SbXz1qqkL; Mon, 21 Oct 2019 13:15:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id gxhWPAYWpogx; Mon, 21 Oct 2019 13:15:28 +0200 (CEST) X-Auth-Info: PiIVaKonOGojHPVuHgr+KS+HyFir48w+4k4r1OoJjTA= Received: from maia.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 21 Oct 2019 13:15:28 +0200 (CEST) From: Harald Seiler To: u-boot@lists.denx.de Date: Mon, 21 Oct 2019 13:14:20 +0200 Message-Id: <20191021111419.10959-1-hws@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [U-Boot] [PATCH] spl: imx: Use correct boot-device in spl_boot_mode X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" If a board defines a custom boot order using board_boot_order(), the boot-device which is currently attempted might differ from the return value of spl_boot_device(). Use the given boot_device parameter instead of calling spl_boot_device() to prevent an incorrect "unsupported device" error. Supporting this use-case was the original intention for the boot_device parameter, which was introduced in commit 2b1cdafa9fdd ("common: Pass the boot device into spl_boot_mode()"). Signed-off-by: Harald Seiler --- arch/arm/mach-imx/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 1f230aca3397..d50d8e08a61c 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -178,7 +178,7 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) /* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */ u32 spl_boot_mode(const u32 boot_device) { - switch (spl_boot_device()) { + switch (boot_device) { /* for MMC return either RAW or FAT mode */ case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: