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 <michal.simek@xilinx.com>
This commit is contained in:
Michal Simek 2017-07-12 13:21:27 +02:00
parent 55de09292f
commit fd1b635c06
3 changed files with 11 additions and 2 deletions

View file

@ -62,6 +62,11 @@ config DEFINE_TCM_OCM_MMAP
This option if enabled defines the TCM and OCM memory and its This option if enabled defines the TCM and OCM memory and its
memory attributes in MMU table entry. 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 config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED
bool "Overwrite SPL bootmode" bool "Overwrite SPL bootmode"
depends on SPL depends on SPL

View file

@ -20,7 +20,11 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/
endif endif
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" # Suppress "warning: function declaration isn't a prototype"
CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes

View file

@ -119,7 +119,7 @@ int board_early_init_f(void)
zynqmp_pmufw_version(); zynqmp_pmufw_version();
#endif #endif
#if defined(CONFIG_SPL_BUILD) #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
psu_init(); psu_init();
#endif #endif