[PATCH next v2 0/6] rockchip: rk3588: add support for detecting U-Boot proper boot medium

Quentin Schulz foss+uboot at 0leil.net
Wed Nov 8 18:25:36 CET 2023


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.

This is already supported on rk3399 and px30 but with duplicated code,
so this patch series also factor out all of this into spl-boot-order of
Rockchip platforms, which makes it drastically easier to add support to
other SoCs, just a simple array needing to be added to the appropriate
SoC file.

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

While at it, let's do some cleanups for Rockchip platforms.

Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>
---
Changes in v2:
- add factoring into spl-boot-order
- rework rk3588 support to use the factored out function
- add global data ptr cleanup
- remove rk3128 main SoC file (useless content)
- Link to v1: https://lore.kernel.org/r/20230502-rk3588-spl-boot-dev-v1-1-071722a85d2d@theobroma-systems.com

---
Quentin Schulz (6):
      rockchip: rk3399: simplify logic for getting SPL boot medium DT node
      rockchip: px30: simplify logic for getting SPL boot medium DT node
      rockchip: factor out spl_perform_fixups into common spl-boot-order
      rockchip: rk3588: insert u-boot,spl-boot-device into U-Boot device tree
      rockchip: remove unused global data ptr
      rockchip: rk3128: remove noop file

 arch/arm/mach-rockchip/board.c          |  3 --
 arch/arm/mach-rockchip/px30/px30.c      | 50 +++---------------------------
 arch/arm/mach-rockchip/rk3128/Makefile  |  1 -
 arch/arm/mach-rockchip/rk3128/rk3128.c  | 16 ----------
 arch/arm/mach-rockchip/rk3308/rk3308.c  |  3 --
 arch/arm/mach-rockchip/rk3328/rk3328.c  |  3 --
 arch/arm/mach-rockchip/rk3368/rk3368.c  |  3 --
 arch/arm/mach-rockchip/rk3399/rk3399.c  | 55 +++------------------------------
 arch/arm/mach-rockchip/rk3588/rk3588.c  | 10 ++++--
 arch/arm/mach-rockchip/spl-boot-order.c | 49 +++++++++++++++++++++++++++++
 10 files changed, 66 insertions(+), 127 deletions(-)
---
base-commit: e17d174773e9ba9447596708e702b7382e47a6cf
change-id: 20230502-rk3588-spl-boot-dev-efa2777cc21b

Best regards,
-- 
Quentin Schulz <quentin.schulz at theobroma-systems.com>



More information about the U-Boot mailing list