]> git.sur5r.net Git - u-boot/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>
Wed, 2 Aug 2017 07:11:52 +0000 (09:11 +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 2a0e8f2cbf66e259da4d2a0bc16ca44a4382d0aa..5ffc9f6c867ba6a004c1c0509bbb494676b86aa7 100644 (file)
@@ -62,6 +62,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 9d69d6546e2cbaddbd62be8666d51ca8d810c832..75aab92f047321eebbb59b4da8b72be25742d364 100644 (file)
@@ -20,7 +20,11 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/
 endif
 endif
 
-obj-$(CONFIG_SPL_BUILD) += $(init-objs)
+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
 
 # Suppress "warning: function declaration isn't a prototype"
 CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes
index 442637bcae2c438d69513934132e3aceb8937f50..ecdae5e261f635b6fba2b68c22c7554d41a1c18e 100644 (file)
@@ -119,7 +119,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