public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: lindsey.stanpoor at gmail.com <lindsey.stanpoor@gmail.com>
To: u-boot@lists.denx.de
Subject: [RFC] [PATCH] rockchip: Pinebook Pro: fix mmc boot ordering
Date: Mon,  7 Sep 2020 09:07:03 -0700	[thread overview]
Message-ID: <20200907160703.28355-1-lindsey.stanpoor@gmail.com> (raw)

From: Cameron Nemo <cnemo@tutanota.com>

On the Pinebook Pro, and perhaps some other boards, the mmc indices are
opposite from what is implied by the comment in
include/configs/rockchip-common.h.

This commit fixes the boot ordering to prioritize the SD card over eMMC.

I am not sure if this appropriate for the Pinebook Pro alone (only board
I can test with atm), or other boards as well (rk3399 or otherwise).

Most distributions of U-Boot that actually target rk3399 boards apply a
similar patch, such as Manjaro (shipped by default on PBP) and armbian.

https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro/-/blob/60ed56b9bf8809309ec6252bfc45bca38c2b858a/0002-Correct-boot-order-to-be-USB-SD-eMMC.patch
https://github.com/armbian/build/blob/5a2b2c360b9c26ca4bd0d309af7cd3994fd08b7d/patch/u-boot/u-boot-rockchip64-mainline/general-prioritize-sd.patch

Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
---
 include/configs/pinebook-pro-rk3399.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/configs/pinebook-pro-rk3399.h b/include/configs/pinebook-pro-rk3399.h
index d478b19917..59780bfb0b 100644
--- a/include/configs/pinebook-pro-rk3399.h
+++ b/include/configs/pinebook-pro-rk3399.h
@@ -14,6 +14,14 @@
 
 #include <configs/rk3399_common.h>
 
+/* On Pinebook Pro, mmc1 is SD and mmc0 is eMMC */
+#if CONFIG_IS_ENABLED(CMD_MMC)
+	#undef BOOT_TARGET_MMC
+	#define BOOT_TARGET_MMC(func) \
+		func(MMC, mmc, 1) \
+		func(MMC, mmc, 0)
+#endif
+
 #define SDRAM_BANK_SIZE			(2UL << 30)
 
 #define CONFIG_USB_OHCI_NEW
-- 
2.28.0

                 reply	other threads:[~2020-09-07 16:07 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=20200907160703.28355-1-lindsey.stanpoor@gmail.com \
    --to=lindsey.stanpoor@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox