[PATCH 3/5] arm64: zynqmp: Fix dependencies around ZYNQMP_PSU_INIT_ENABLED

Michal Simek michal.simek at xilinx.com
Thu Feb 17 14:28:40 CET 2022


ZYNQMP_PSU_INIT_ENABLED is called only when BOARD_EARLY_INIT_F is defined
that's why cover this dependency in Kconfig.
 board_early_init_f() is only part related to
CONFIG_ZYNQMP_PSU_INIT_ENABLED which is disabled now that's why disable
BOARD_EARLY_INIT_F and also build board_early_init_f() only when
CONFIG_BOARD_EARLY_INIT_F is enabled.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 arch/arm/mach-zynqmp/Kconfig         | 1 +
 board/xilinx/zynqmp/zynqmp.c         | 2 ++
 configs/xilinx_zynqmp_virt_defconfig | 1 -
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig
index f8b5906039d1..66045067d2fe 100644
--- a/arch/arm/mach-zynqmp/Kconfig
+++ b/arch/arm/mach-zynqmp/Kconfig
@@ -140,6 +140,7 @@ config DEFINE_TCM_OCM_MMAP
 
 config ZYNQMP_PSU_INIT_ENABLED
 	bool "Include psu_init"
+	select BOARD_EARLY_INIT_F
 	help
 	  Include psu_init to full u-boot. SPL include psu_init by default.
 
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 242e143cbfd7..3a10ed859d2c 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -313,6 +313,7 @@ static char *zynqmp_get_silicon_idcode_name(void)
 }
 #endif
 
+#if defined(CONFIG_BOARD_EARLY_INIT_F)
 int board_early_init_f(void)
 {
 #if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
@@ -345,6 +346,7 @@ int board_early_init_f(void)
 
 	return 0;
 }
+#endif
 
 static int multi_boot(void)
 {
diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
index def7696b3d34..3bb54c86ca00 100644
--- a/configs/xilinx_zynqmp_virt_defconfig
+++ b/configs/xilinx_zynqmp_virt_defconfig
@@ -30,7 +30,6 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000
 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="run scsi_init;usb start"
-CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_FPGA=y
-- 
2.35.0



More information about the U-Boot mailing list