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

It is possible to boot U-Boot proper from a different storage medium
than the one used by the BOOTROM to load the SPL. This information is
stored in the u-boot,spl-boot-device Device Tree property and is
accessible from U-Boot proper so that it has knowledge at runtime where
it was loaded from.

Let's add support for this feature for rk3588 the same way it was done
for px30 and rk3399.

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

diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c 
b/arch/arm/mach-rockchip/rk3588/rk3588.c
index b1f535fad50..fde5f281b0a 100644
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
@@ -163,3 +163,11 @@ int arch_cpu_init(void)
        return 0;
 }
 #endif
+
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)
+const char * const spl_boot_devices[BOOT_DEVICE_NONE + 1] = {
+       [BOOT_DEVICE_MMC2] = "/mmc@fe2e0000",
+       [BOOT_DEVICE_MMC1] = "/mmc@fe2c0000",
+       [BOOT_DEVICE_SPI] = "/spi@fe2b0000/flash@0",
+};
+#endif

-- 
2.41.0

Reply via email to