]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: Consolidate board_fit_config_name_match() for Xilinx platforms
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Oct 2020 11:26:13 +0000 (12:26 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 29 Oct 2020 07:55:43 +0000 (08:55 +0100)
Move board_fit_config_name_match() from Zynq/ZynqMP to common location.
This change will open a way to use it also by Microblaze and Versal.
Through this function there is a way to handle images with multiple DTBs.
For now match it with DEVICE_TREE as is done for Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynq/spl.c
arch/arm/mach-zynqmp/spl.c
board/xilinx/common/board.c

index cb8cfd2f35370be915fba0bb0bba3d1ce8ca9c45..d09141c3bc7ef959bbeb6477004da8845dd3158f 100644 (file)
@@ -9,7 +9,6 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
-#include <generated/dt.h>
 
 #include <asm/io.h>
 #include <asm/spl.h>
@@ -86,16 +85,3 @@ void spl_board_prepare_for_boot(void)
        ps7_post_config();
        debug("SPL bye\n");
 }
-
-#ifdef CONFIG_SPL_LOAD_FIT
-int board_fit_config_name_match(const char *name)
-{
-       /* Just empty function now - can't decide what to choose */
-       debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE);
-
-       if (!strcmp(name, DEVICE_TREE))
-               return 0;
-
-       return -1;
-}
-#endif
index 9dd61e25f6f5bbbb2fc00a1f2084945e6af2dc51..88386b23e5da61f00e0041e8eae05ff7e8f20ff1 100644 (file)
@@ -119,13 +119,3 @@ int spl_start_uboot(void)
        return 0;
 }
 #endif
-
-#ifdef CONFIG_SPL_LOAD_FIT
-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 -1;
-}
-#endif
index bcdd3ae4f14a689b606f2e4c1c641e4b30379eff..cdc06a39ce5828adc5bf066652d9342310829670 100644 (file)
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <i2c_eeprom.h>
 #include <net.h>
+#include <generated/dt.h>
 
 #include "fru.h"
 
@@ -425,3 +426,13 @@ int board_late_init_xilinx(void)
        return 0;
 }
 #endif
+
+int __maybe_unused board_fit_config_name_match(const char *name)
+{
+       debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE);
+
+       if (!strcmp(name, DEVICE_TREE))
+               return 0;
+
+       return -1;
+}