All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Kever Yang <kever.yang@rock-chips.com>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>
Cc: Jagan Teki <jagan@edgeble.ai>,
	Eugen Hristev <eugen.hristev@collabora.com>,
	u-boot@lists.denx.de, Jonas Karlman <jonas@kwiboo.se>
Subject: [PATCH 07/12] rockchip: rk3588: Add boot device detection
Date: Tue, 14 Mar 2023 00:38:30 +0000 (UTC)	[thread overview]
Message-ID: <20230314003755.512696-8-jonas@kwiboo.se> (raw)
In-Reply-To: <20230314003755.512696-1-jonas@kwiboo.se>

Enable SPL on RK3588 to detect which device it was booted from.
Fixes use of same-as-spl in u-boot,spl-boot-order prop.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 arch/arm/mach-rockchip/rk3588/rk3588.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
index 2ee1db47671f..18e67b5ca9b2 100644
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
@@ -8,6 +8,7 @@
 #include <spl.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
+#include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/ioc_rk3588.h>
 
@@ -36,6 +37,12 @@ DECLARE_GLOBAL_DATA_PTR;
 #define BUS_IOC_GPIO2D_IOMUX_SEL_H	0x5c
 #define BUS_IOC_GPIO3A_IOMUX_SEL_L	0x60
 
+const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@fe2e0000",
+	[BROM_BOOTSOURCE_SPINOR] = "/spi@fe2b0000/flash@0",
+	[BROM_BOOTSOURCE_SD] = "/mmc@fe2c0000",
+};
+
 static struct mm_region rk3588_mem_map[] = {
 	{
 		.virt = 0x0UL,
-- 
2.39.2


  parent reply	other threads:[~2023-03-14  0:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  0:38 [PATCH 00/12] rockchip: Fixes for RK3568 and RK3588 and cleanup Jonas Karlman
2023-03-14  0:38 ` [PATCH 01/12] rockchip: Fix early use of bootph props Jonas Karlman
2023-03-14  3:15   ` Kever Yang
2023-03-14  0:38 ` [PATCH 02/12] rockchip: rk3568: Fix boot device detection Jonas Karlman
2023-03-14  3:16   ` Kever Yang
2023-03-14  0:38 ` [PATCH 03/12] rockchip: rk3568-rock-3a: Sync device tree from linux Jonas Karlman
2023-03-14  3:17   ` Kever Yang
2023-03-14  0:38 ` [PATCH 04/12] clk: rockchip: rk3568: Fix reset handler Jonas Karlman
2023-03-14  0:38 ` [PATCH 05/12] clk: rockchip: rk3588: Fix clk_aux16m in clock driver Jonas Karlman
2023-03-14  3:21   ` Kever Yang
2023-03-14  0:38 ` [PATCH 06/12] rockchip: rk3588-rock-5b: Fix sdmmc boot Jonas Karlman
2023-03-14  3:22   ` Kever Yang
2023-03-14  0:38 ` Jonas Karlman [this message]
2023-03-14  3:22   ` [PATCH 07/12] rockchip: rk3588: Add boot device detection Kever Yang
2023-03-14  0:38 ` [PATCH 08/12] rockchip: tinker-rk3288: Use common BOOT_TARGET_DEVICES Jonas Karlman
2023-03-14  3:28   ` Kever Yang
2023-03-14  0:38 ` [PATCH 09/12] mmc: rockchip_dw_mmc: Fix get_mmc_clk return value Jonas Karlman
2023-03-14  3:25   ` Kever Yang
2023-03-14  0:38 ` [PATCH 10/12] rockchip: include: configs: Remove dangling comments Jonas Karlman
2023-03-14  3:28   ` Kever Yang
2023-03-14  0:38 ` [PATCH 11/12] rockchip: include: configs: Remove unused SDRAM_BANK_SIZE Jonas Karlman
2023-03-14  3:29   ` Kever Yang
2023-03-14  0:38 ` [PATCH 12/12] rockchip: Convert rk35xx to use standard boot Jonas Karlman
2023-03-15 19:43   ` Simon Glass
2023-03-19  6:16   ` Kever Yang
2023-03-19  9:13     ` Jonas Karlman

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=20230314003755.512696-8-jonas@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=eugen.hristev@collabora.com \
    --cc=jagan@edgeble.ai \
    --cc=kever.yang@rock-chips.com \
    --cc=philipp.tomsich@vrull.eu \
    --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.