All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Seiler <hws@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] spl: imx: Use correct boot-device in spl_boot_mode
Date: Thu,  7 Nov 2019 14:13:46 +0100	[thread overview]
Message-ID: <20191107131346.21630-1-hws@denx.de> (raw)

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()").

Fixes: 2b1cdafa9fdd ("common: Pass the boot device into spl_boot_mode()")
Signed-off-by: Harald Seiler <hws@denx.de>
---

Changes for v2:
    - Rebase ontop of master to fix a merge-conflict (no functional change)

 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 5cc74b6f9b0f..26d07d1bf283 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -190,7 +190,7 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 u32 spl_boot_mode(const u32 boot_device)
 {
 #if defined(CONFIG_MX7) || defined(CONFIG_IMX8M) || defined(CONFIG_IMX8)
-	switch (get_boot_device()) {
+	switch (boot_device) {
 	/* for MMC return either RAW or FAT mode */
 	case SD1_BOOT:
 	case SD2_BOOT:
-- 
2.20.1

                 reply	other threads:[~2019-11-07 13:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191107131346.21630-1-hws@denx.de \
    --to=hws@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.