]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
xilinx: Use variable for passing board_name
authorMichal Simek <michal.simek@xilinx.com>
Fri, 23 Jul 2021 07:55:59 +0000 (09:55 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 24 Aug 2021 13:57:59 +0000 (15:57 +0200)
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>
board/xilinx/common/board.c

index b736528f26b6c56d4a5805b076e7f4ce4a1c71a0..f9ead99a0ddab7b57446945b3bbc22e7be97e4e3 100644 (file)
@@ -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;