All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <foss+uboot@0leil.net>
To: klaus.goger@theobroma-systems.com, sjg@chromium.org,
	philipp.tomsich@vrull.eu, kever.yang@rock-chips.com
Cc: heiko@sntech.de, u-boot@lists.denx.de,
	Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	Quentin Schulz <foss+uboot@0leil.net>
Subject: [PATCH v2 2/5] rockchip: px30: list possible SPL boot devices
Date: Mon, 17 Oct 2022 12:46:38 +0200	[thread overview]
Message-ID: <20221017-upstream-ringneck-v2-2-0f03912ebac2@theobroma-systems.com> (raw)
In-Reply-To: <20221017-upstream-ringneck-v2-0-0f03912ebac2@theobroma-systems.com>

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

BOOTROM sets a bit in a CPU register so that the software can know from
where the first stage bootloader was booted. One use case for this is to
specify the default loading medium for U-Boot proper to match the one
used by the BOOTROM to load the SPL (same-as-spl in
u-boot,spl-boot-order).

Let's create the mapping between BOOTROM value and Device Tree node
names for MMC devices.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 arch/arm/mach-rockchip/px30/px30.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c
index 0641e6af0f..481b50235e 100644
--- a/arch/arm/mach-rockchip/px30/px30.c
+++ b/arch/arm/mach-rockchip/px30/px30.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
+#include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/grf_px30.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/uart.h>
@@ -15,6 +16,11 @@
 #include <asm/arch-rockchip/cru_px30.h>
 #include <dt-bindings/clock/px30-cru.h>
 
+const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@ff390000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@ff370000",
+};
+
 static struct mm_region px30_mem_map[] = {
 	{
 		.virt = 0x0UL,

-- 
b4 0.10.1

  parent reply	other threads:[~2022-10-17 10:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 10:46 [PATCH v2 0/5] add support for Theobroma Systems PX30-µQ7 (Ringneck) with Haikou devkit Quentin Schulz
2022-10-17 10:46 ` [PATCH v2 1/5] rockchip: px30: fix CONFIG_IRAM_BASE Quentin Schulz
2022-10-17 10:46 ` Quentin Schulz [this message]
2022-10-17 10:46 ` [PATCH v2 3/5] rockchip: px30: insert u-boot, spl-boot-device into U-Boot device tree Quentin Schulz
2022-10-17 10:46 ` [PATCH v2 4/5] arm64: dts: rockchip: sync px30 with linux-next Quentin Schulz
2022-10-17 10:46 ` [PATCH v2 5/5] rockchip: add support for PX30 Ringneck SoM on Haikou Devkit Quentin Schulz

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=20221017-upstream-ringneck-v2-2-0f03912ebac2@theobroma-systems.com \
    --to=foss+uboot@0leil.net \
    --cc=heiko@sntech.de \
    --cc=kever.yang@rock-chips.com \
    --cc=klaus.goger@theobroma-systems.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --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.