From: Michal Simek Date: Wed, 12 Jul 2017 11:21:27 +0000 (+0200) Subject: arm64: zynqmp: Add Kconfig option for adding psu_init to binary X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a09a249a82f632cd37d04fbfc04b98e34559553f;p=thirdparty%2Fu-boot.git arm64: zynqmp: Add Kconfig option for adding psu_init to binary There is a need to include psu_init also in mini u-boot configuration that's why handle psu_init via Kconfig property. Signed-off-by: Michal Simek --- diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig index b1f2a8ecc5e..96edea39741 100644 --- a/arch/arm/cpu/armv8/zynqmp/Kconfig +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig @@ -80,6 +80,11 @@ config DEFINE_TCM_OCM_MMAP This option if enabled defines the TCM and OCM memory and its memory attributes in MMU table entry. +config ZYNQMP_PSU_INIT_ENABLED + bool "Include psu_init" + help + Include psu_init to full u-boot. SPL include psu_init by default. + config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED bool "Overwrite SPL bootmode" depends on SPL diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile index 2bf03753033..60d002ebf9f 100644 --- a/board/xilinx/zynqmp/Makefile +++ b/board/xilinx/zynqmp/Makefile @@ -20,8 +20,13 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/ endif endif +ifdef_any_of = $(filter-out undefined,$(foreach v,$(1),$(origin $(v)))) + +ifneq ($(call ifdef_any_of, CONFIG_ZYNQMP_PSU_INIT_ENABLED CONFIG_SPL_BUILD),) +obj-y += $(init-objs) +endif + obj-$(CONFIG_ZYNQ_SDHCI) += tap_delays.o -obj-$(CONFIG_SPL_BUILD) += $(init-objs) # Suppress "warning: function declaration isn't a prototype" CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 91118664af4..39503e8ce8c 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -121,7 +121,7 @@ int board_early_init_f(void) zynqmp_pmufw_version(); #endif -#if defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED) psu_init(); #endif