]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm64: zynqmp: Add Kconfig option for adding psu_init to binary
authorMichal Simek <michal.simek@xilinx.com>
Wed, 12 Jul 2017 11:21:27 +0000 (13:21 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 17 Jul 2017 07:32:28 +0000 (09:32 +0200)
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 <michal.simek@xilinx.com>
arch/arm/cpu/armv8/zynqmp/Kconfig
board/xilinx/zynqmp/Makefile
board/xilinx/zynqmp/zynqmp.c

index b1f2a8ecc5e1a5453ec6a6ccc1dbfc34a7bb429a..96edea397413d9c0d4603db41f6c0af7863d5612 100644 (file)
@@ -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
index 2bf0375303311ba3d0dc2146565bd8aaf0063aba..60d002ebf9f50fb197d3885ae1a2754d368cd70a 100644 (file)
@@ -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
index 91118664af47a4ba232eed38417bef25a3a7b0a4..39503e8ce8cb7292ee0a98b4fdc6fbdfffcc425d 100644 (file)
@@ -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