]> git.dujemihanovic.xyz Git - u-boot.git/commit
rockchip: factor out spl_perform_fixups into common spl-boot-order
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Thu, 18 Jan 2024 13:55:57 +0000 (14:55 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 19 Jan 2024 02:57:36 +0000 (10:57 +0800)
commit948b315e4153f9c2afea2647bc973527464df42c
tree8be8af307c803a0a106d17f70075eef403034f5c
parenta5843cfce8a73f3c360a0dc6fadc33fe2c36367a
rockchip: factor out spl_perform_fixups into common spl-boot-order

All SoCs are susceptible to wanting to know which storage medium was
used to load U-Boot SPL. So instead of reimplementing the same functions
in SoCs over and over again (here just rk3399 and px30 but rk3588 is
coming), let's just put all this in common into spl-boot-order.c
allowing to support a new SoC just by defining the spl_boot_devices
array in the appropriate SoC file.

Note that spl_perform_fixups() now calls spl_image_fdt_addr() to get the
address of the fdt instead of directly reading the
spl_image_info->fdt_addr member, because that member is not guaranteed
to be present (guarded with compile flags). This is essential because we
move the logic away from px30 and rk3399 which had those compile flags
enabled to code run for all Rockchip SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
arch/arm/mach-rockchip/px30/px30.c
arch/arm/mach-rockchip/rk3399/rk3399.c
arch/arm/mach-rockchip/spl-boot-order.c