1# Copyright (C) 2018 Marvell International Ltd. 2# 3# SPDX-License-Identifier: BSD-3-Clause 4# https://spdx.org/licenses 5 6MARVELL_PLAT_BASE := plat/marvell/armada 7MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell/armada 8 9include plat/marvell/version.mk 10include plat/marvell/marvell.mk 11 12VERSION_STRING +=(Marvell-${SUBVERSION}) 13 14SEPARATE_CODE_AND_RODATA := 1 15 16# flag to switch from PLL to ARO 17ARO_ENABLE := 0 18$(eval $(call add_define,ARO_ENABLE)) 19 20# Convert LLC to secure SRAM 21LLC_SRAM := 0 22$(eval $(call add_define,LLC_SRAM)) 23 24# Enable/Disable LLC 25LLC_ENABLE := 1 26$(eval $(call add_define,LLC_ENABLE)) 27 28include lib/xlat_tables_v2/xlat_tables.mk 29 30PLAT_INCLUDES += -I$(MARVELL_PLAT_INCLUDE_BASE)/common \ 31 -I$(MARVELL_PLAT_INCLUDE_BASE)/common/aarch64 32 33 34PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \ 35 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_common.c \ 36 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_helpers.S \ 37 $(MARVELL_COMMON_BASE)/marvell_console.c 38 39BL1_SOURCES += drivers/delay_timer/delay_timer.c \ 40 drivers/io/io_fip.c \ 41 drivers/io/io_memmap.c \ 42 drivers/io/io_storage.c \ 43 $(MARVELL_PLAT_BASE)/common/marvell_bl1_setup.c \ 44 $(MARVELL_PLAT_BASE)/common/marvell_io_storage.c \ 45 $(MARVELL_PLAT_BASE)/common/plat_delay_timer.c 46 47ifdef EL3_PAYLOAD_BASE 48# Need the arm_program_trusted_mailbox() function to release secondary CPUs from 49# their holding pen 50endif 51 52BL2_SOURCES += drivers/io/io_fip.c \ 53 drivers/io/io_memmap.c \ 54 drivers/io/io_storage.c \ 55 common/desc_image_load.c \ 56 $(MARVELL_PLAT_BASE)/common/marvell_bl2_setup.c \ 57 $(MARVELL_PLAT_BASE)/common/marvell_io_storage.c \ 58 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_bl2_mem_params_desc.c \ 59 $(MARVELL_PLAT_BASE)/common/marvell_image_load.c 60 61ifeq (${SPD},opteed) 62PLAT_INCLUDES += -Iinclude/lib 63BL2_SOURCES += lib/optee/optee_utils.c 64endif 65 66BL31_SOURCES += $(MARVELL_PLAT_BASE)/common/marvell_bl31_setup.c \ 67 $(MARVELL_PLAT_BASE)/common/marvell_pm.c \ 68 $(MARVELL_PLAT_BASE)/common/marvell_topology.c \ 69 plat/common/plat_psci_common.c \ 70 $(MARVELL_PLAT_BASE)/common/plat_delay_timer.c \ 71 drivers/delay_timer/delay_timer.c 72 73# PSCI functionality 74$(eval $(call add_define,CONFIG_ARM64)) 75 76# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images 77# in the FIP if the platform requires. 78ifneq ($(BL32_EXTRA1),) 79$(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1)) 80endif 81ifneq ($(BL32_EXTRA2),) 82$(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2)) 83endif 84 85# MSS (SCP) build 86ifeq (${MSS_SUPPORT}, 1) 87include $(MARVELL_PLAT_BASE)/common/mss/mss_common.mk 88endif 89 90fip: mrvl_flash 91