Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # SPDX-License-Identifier: GPL-2.0+
  2. #
  3. # (C) Copyright 2014 - 2016 Xilinx, Inc.
  4. # Michal Simek <michal.simek@xilinx.com>
  5. obj-y := zynqmp.o
  6. hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
  7. init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\
  8. $(hw-platform-y)/psu_init_gpl.o)
  9. ifeq ($(init-objs),)
  10. ifneq ($(wildcard $(srctree)/$(src)/psu_init_gpl.c),)
  11. init-objs := psu_init_gpl.o
  12. $(if $(CONFIG_SPL_BUILD),\
  13. $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/))
  14. endif
  15. endif
  16. ifdef_any_of = $(filter-out undefined,$(foreach v,$(1),$(origin $(v))))
  17. ifneq ($(call ifdef_any_of, CONFIG_ZYNQMP_PSU_INIT_ENABLED CONFIG_SPL_BUILD),)
  18. obj-y += $(init-objs)
  19. endif
  20. obj-$(CONFIG_MMC_SDHCI_ZYNQ) += tap_delays.o
  21. ifndef CONFIG_SPL_BUILD
  22. obj-$(CONFIG_CMD_ZYNQMP) += cmds.o
  23. endif
  24. # Suppress "warning: function declaration isn't a prototype"
  25. CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes
  26. # To include xil_io.h
  27. CFLAGS_psu_init_gpl.o := -I$(srctree)/$(src)
  28. # To suppress "warning: cast to pointer from integer of different size"
  29. CFLAGS_psu_init_gpl.o += -Wno-int-to-pointer-cast