diff mbox series

[02/10] xilinx: Use variable for passing board_name

Message ID e822ba9dcc1124365757a10e379f8e0e474b6b9e.1629704273.git.michal.simek@xilinx.com
State Accepted
Commit 57f710320fcd18bb5deaa9654dbce4da4de9d987
Delegated to: Michal Simek
Headers show
Series xilinx: Add support for DTB reselection | expand

Commit Message

Michal Simek Aug. 23, 2021, 7:37 a.m. UTC
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 <michal.simek@xilinx.com>
---

Changes in v2: None

 board/xilinx/common/board.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 1458b31c21a9..db9705c1b7e4 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -436,11 +436,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;