xref: /rk3399_ARM-atf/plat/marvell/armada/common/marvell_common.mk (revision 0396bcbc6ae75a71489c078ae43f6f549abd5be4)
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
25ifeq (${LLC_SRAM}, 0)
26LLC_ENABLE			:= 1
27else
28# When LLC_SRAM=1, the entire LLC converted to SRAM and enabled at BL1.
29# All existing cases activating LLC at BL31 stage should be disabled.
30# The below assignment does not allow changing the LLC_ENABLE
31# value in the command line.
32LLC_ENABLE			= 0
33endif
34$(eval $(call add_define,LLC_ENABLE))
35
36include lib/xlat_tables_v2/xlat_tables.mk
37
38PLAT_INCLUDES		+=	-I$(MARVELL_PLAT_INCLUDE_BASE)/common	\
39				-I$(MARVELL_PLAT_INCLUDE_BASE)/common/aarch64
40
41
42PLAT_BL_COMMON_SOURCES  += ${XLAT_TABLES_LIB_SRCS} \
43				$(MARVELL_PLAT_BASE)/common/aarch64/marvell_common.c	\
44				$(MARVELL_PLAT_BASE)/common/aarch64/marvell_helpers.S	\
45				$(MARVELL_COMMON_BASE)/marvell_console.c
46
47BL1_SOURCES		+=	drivers/delay_timer/delay_timer.c			\
48				drivers/io/io_fip.c					\
49				drivers/io/io_memmap.c					\
50				drivers/io/io_storage.c					\
51				$(MARVELL_PLAT_BASE)/common/marvell_bl1_setup.c		\
52				$(MARVELL_PLAT_BASE)/common/marvell_io_storage.c	\
53				$(MARVELL_PLAT_BASE)/common/plat_delay_timer.c
54
55ifdef EL3_PAYLOAD_BASE
56# Need the arm_program_trusted_mailbox() function to release secondary CPUs from
57# their holding pen
58endif
59
60BL2_SOURCES		+=	drivers/io/io_fip.c					\
61				drivers/io/io_memmap.c					\
62				drivers/io/io_storage.c					\
63				common/desc_image_load.c				\
64				$(MARVELL_PLAT_BASE)/common/marvell_bl2_setup.c		\
65				$(MARVELL_PLAT_BASE)/common/marvell_io_storage.c	\
66				$(MARVELL_PLAT_BASE)/common/aarch64/marvell_bl2_mem_params_desc.c	\
67				$(MARVELL_PLAT_BASE)/common/marvell_image_load.c
68
69
70BL31_SOURCES		+=	$(MARVELL_PLAT_BASE)/common/marvell_bl31_setup.c	\
71				$(MARVELL_PLAT_BASE)/common/marvell_pm.c		\
72				$(MARVELL_PLAT_BASE)/common/marvell_topology.c		\
73				plat/common/plat_psci_common.c				\
74				$(MARVELL_PLAT_BASE)/common/plat_delay_timer.c		\
75				drivers/delay_timer/delay_timer.c
76
77# PSCI functionality
78$(eval $(call add_define,CONFIG_ARM64))
79
80# MSS (SCP) build
81ifeq (${MSS_SUPPORT}, 1)
82include $(MARVELL_PLAT_BASE)/common/mss/mss_common.mk
83endif
84
85fip: mrvl_flash
86