Record the device the BootROM booted from as /chosen/bootsource. SPL sets it in the next stages device tree, u-booot proper passes it on to the OS. Implemented for AM62x and switched Rockchip to the generic code.
Note: On AM62x side the default path of bootsource_get_ofpath() is never taken because the override ends up in every stage. @Quentin: Would be nice to get your Tested-by for the Rockchips part. Let me know what you think. Changes in v2: - Drop CONFIG_FDT_FIXUP_BOOTSOURCE, always set the property - Drop description from chosen.txt - Rename fdt_setup_bootsource() to fdt_fixup_bootsource() and export it - SPL now also writes /chosen/bootsource into the DT it passes to the next stage. A stage that does not detect the boot source itself simply reads the value from its own DT and passes it on. - Switch Rockchip to use the generic fixup - On AM62X, OSPI path now points to flash@0 - Reword some docs v1: https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/ Wadim Egorov (3): fdt_support: Add /chosen/bootsource fixup arm: mach-k3: Set /chosen/bootsource for the next boot stage rockchip: Use the generic /chosen/bootsource fixup arch/arm/mach-k3/am62x/boot.c | 27 ++++++++++++++++ arch/arm/mach-k3/common.c | 1 + arch/arm/mach-rockchip/spl-boot-order.c | 11 ++++--- boot/fdt_support.c | 42 +++++++++++++++++++++++++ include/fdt_support.h | 26 +++++++++++++++ 5 files changed, 102 insertions(+), 5 deletions(-) -- 2.48.1
