[PATCH 10/10] xilinx: zynqmp: Support vendor specific board_init

Stefan Herbrechtsmeier stefan.herbrechtsmeier-oss at weidmueller.com
Wed Jun 8 18:20:53 CEST 2022


From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>

Add a board_init_xilinx function to allow foreign vendors to reuse the
xilinx zynqmp board code and add addition code to the board_init
function.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>

---

 board/xilinx/common/board.c  | 5 +++++
 board/xilinx/common/board.h  | 2 ++
 board/xilinx/zynqmp/zynqmp.c | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 5f2afb9def..643959bee7 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -401,6 +401,11 @@ void *board_fdt_blob_setup(int *err)
 }
 #endif
 
+int board_init_xilinx(void)
+{
+	return 0;
+}
+
 #if defined(CONFIG_BOARD_LATE_INIT)
 static int env_set_by_index(const char *name, int index, char *data)
 {
diff --git a/board/xilinx/common/board.h b/board/xilinx/common/board.h
index 69e642429b..3f6377d706 100644
--- a/board/xilinx/common/board.h
+++ b/board/xilinx/common/board.h
@@ -7,6 +7,8 @@
 #ifndef _BOARD_XILINX_COMMON_BOARD_H
 #define _BOARD_XILINX_COMMON_BOARD_H
 
+int board_init_xilinx(void);
+
 int board_late_init_xilinx(void);
 
 int xilinx_read_eeprom(void);
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 106c3953e1..ec195105ad 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -186,7 +186,7 @@ int board_init(void)
 	if (current_el() == 3)
 		printf("Multiboot:\t%d\n", multi_boot());
 
-	return 0;
+	return board_init_xilinx();
 }
 
 int board_early_init_r(void)
-- 
2.30.2



More information about the U-Boot mailing list