summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_disk.c
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2024-01-18 14:55:58 +0100
committerKever Yang <kever.yang@rock-chips.com>2024-01-19 10:57:36 +0800
commitd57e16c7e712ec8188c5c409e4854d147adb81e8 (patch)
tree2e43797cfa54a84b703758ae852bee9b2c2c01ff /lib/efi_loader/efi_disk.c
parent948b315e4153f9c2afea2647bc973527464df42c (diff)
rockchip: find U-boot proper boot device by inverting the logic that sets it
BOOT_DEVICE_* is set by spl_node_to_boot_device() depending on the block device number associated with the MMC device the SPL used to load U-Boot proper from. It is NOT related to the mmc alias in the Device Tree. For SPI flashes, all SPI flashes will return BOOT_DEVICE_SPI so there's currently no way to know from which one the SPL loaded U-Boot proper from. Therefore, let's just find the first valid candidate in /chosen/u-boot,spl-boot-order that is a SPI flash and return that path. This is a best effort. While the original implementation may have worked, using the exact same mechanism but in inverted fashion makes it less likely to have surprising corner-cases or side-effects. A nice side-effect is that all existing and future Rockchip SoCs now automatically have their /chosen/u-boot,spl-boot-device set. 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>
Diffstat (limited to 'lib/efi_loader/efi_disk.c')
0 files changed, 0 insertions, 0 deletions