From 5f33ed768964602636a5dc471013cd89b1c22e3b Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 23 Jul 2021 09:55:59 +0200 Subject: [PATCH] xilinx: Use variable for passing board_name Use variable which points to DEVICE_TREE by default. The reason for this change is to enable DTB_RESELECT and MULTI_DTB_FIT where board detection can be used for change DTB at run time. That's why there must be reference in board_fit_config_name_match() via variable instead of hardcoding it which is sufficient for that use case. Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index b736528f26b..f9ead99a0dd 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -435,11 +435,13 @@ int board_late_init_xilinx(void) } #endif +static char *board_name = DEVICE_TREE; + int __maybe_unused board_fit_config_name_match(const char *name) { - debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE); + debug("%s: Check %s, default %s\n", __func__, name, board_name); - if (!strcmp(name, DEVICE_TREE)) + if (!strcmp(name, board_name)) return 0; return -1; -- 2.47.3