common: fit: Add weak board_fit_config_name_match
Subsystems (3)
PATCH 1/1 common: fit: Add weak board_fit_config_name_match
Several architectures had a default board_fit_config_name_match already; this provides a generic weak version. We default to rejecting all configs. This will use the FIT's default config, instead of the first config. This may result in boot failures if there are multiple configurations and the first config is *not* the default.
---
arch/arm/cpu/armv8/fsl-layerscape/spl.c | 9 --------- arch/arm/mach-rockchip/spl.c | 10 ---------- common/common_fit.c | 5 +++++ 3 files changed, 5 insertions(+), 19 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/spl.c +0 -9
@@ -139,13 +139,4 @@ int spl_start_uboot(void)return 1 ; }#endif /* CONFIG_SPL_OS_BOOT */ -#ifdef CONFIG_SPL_LOAD_FIT -__weak int board_fit_config_name_match (const char *name) -{ -/* Just empty function now - can't decide what to choose */ -debug ("%s: %s\n" , __func__, name); - -return 0 ; -} -#endif #endif /* CONFIG_SPL_BUILD */
arch/arm/mach-rockchip/spl.c +0 -10
@@ -151,13 +151,3 @@ void board_init_f(ulong dummy)#endif preloader_console_init (); } - -#ifdef CONFIG_SPL_LOAD_FIT -int __weak board_fit_config_name_match (const char *name) -{ -/* Just empty function now - can't decide what to choose */ -debug ("%s: %s\n" , __func__, name); - -return 0 ; -} -#endif
common/common_fit.c +5 -0
@@ -22,6 +22,11 @@ ulong fdt_getprop_u32(const void *fdt, int node, const char *prop)return fdt32_to_cpu (*cell); } +__weak int board_fit_config_name_match (const char *name) +{ +return -EINVAL ; +} +/* * Iterate over all /configurations subnodes and call a platform specific * function to find the matching configuration.
Signature · 1 line
2.25.1
PATCH 1/1 common: fit: Add weak board_fit_config_name_match
Quoted 7 lines · Sean Anderson
Several architectures had a default
board_fit_config_name_matchalready; this provides a generic weak version. We default to rejecting all configs. This will use the FIT's default config, instead of the first config. This may result in boot failures if there are multiple configurations and the first config is *not* the default.Signed-off-by Sean Anderson <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210416/f308c00e/attachment.sig>