]> git.sur5r.net Git - u-boot/blobdiff - board/xilinx/zynqmp/Makefile
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / board / xilinx / zynqmp / Makefile
index efc8edaaf6e6d8c31f95ebfb6fa62c737e9e4769..65bcb598cec9c7e2be7d7a261d508fe866b854ea 100644 (file)
@@ -1,13 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0+
 #
 # (C) Copyright 2014 - 2016 Xilinx, Inc.
 # Michal Simek <michal.simek@xilinx.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
 
 obj-y  := zynqmp.o
 
-hw-platform-y :=$(shell echo $(CONFIG_SYS_CONFIG_NAME))
+hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
 
 init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\
        $(hw-platform-y)/psu_init_gpl.o)
@@ -20,7 +18,15 @@ $(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
+
+ifndef CONFIG_SPL_BUILD
+obj-$(CONFIG_CMD_ZYNQMP) += cmds.o
+endif
 
 # Suppress "warning: function declaration isn't a prototype"
 CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes