arm: socfpga: Enable U-boot FIT Config Name Match with Board ID
Subsystems (3)
PATCH 1/1 arm: socfpga: Enable U-boot FIT Config Name Match with Board ID
From: Yau Wai Gan <[email protected]>
U-boot FIT configuration shall be selected based on the Board ID that is set.
Signed-off-by Yau Wai Gan <[email protected]>
Signed-off-by Jit Loon Lim <[email protected]>
--- arch/arm/mach-socfpga/board.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
arch/arm/mach-socfpga/board.c +8 -5
@@ -131,13 +131,16 @@ u8 socfpga_get_board_id(void) } -#ifdef CONFIG_SPL_BUILD -__weak int board_fit_config_name_match (const char *name) +#if IS_ENABLED (CONFIG_SPL_BUILD ) &&IS_ENABLED (CONFIG_TARGET_SOCFPGA_SOC64 ) +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); +char board_name[10 ]; -return 0 ; +sprintf (board_name,"board_%u" ,socfpga_get_board_id ()); + +debug ("Board name: %s\n" , board_name); + +return strcmp (name, board_name); }#endif
Signature · 1 line
2.26.2