All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xilinx: Consolidate board_fit_config_name_match() for Xilinx platforms
@ 2020-10-26 13:00 Michal Simek
  0 siblings, 0 replies; only message in thread
From: Michal Simek @ 2020-10-26 13:00 UTC (permalink / raw)
  To: u-boot

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>
---

Changes in v2:
- Make it generic for all Xilinx SoCs
- Change subject from: xilinx: versal: Introduce board_fit_config_name_match() for Versal

 arch/arm/mach-zynq/spl.c    | 14 --------------
 arch/arm/mach-zynqmp/spl.c  | 10 ----------
 board/xilinx/common/board.c | 11 +++++++++++
 3 files changed, 11 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index cb8cfd2f3537..d09141c3bc7e 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -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
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 9dd61e25f6f5..88386b23e5da 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -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
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index bcdd3ae4f14a..cdc06a39ce58 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -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;
+}
-- 
2.28.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-26 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 13:00 [PATCH v2] xilinx: Consolidate board_fit_config_name_match() for Xilinx platforms Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.