blob: fcc97acd3670ec2af0f53fae8f23560eac4c0d1c [file] [log] [blame]
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +03001# Copyright (C) 2018 Marvell International Ltd.
2#
3# SPDX-License-Identifier: BSD-3-Clause
4# https://spdx.org/licenses
5
Grzegorz Jaszczyk3039bce2019-11-05 13:14:59 +01006MARVELL_PLAT_BASE := plat/marvell/armada
7MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell/armada
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +03008
Grzegorz Jaszczyk3039bce2019-11-05 13:14:59 +01009include plat/marvell/version.mk
10include plat/marvell/marvell.mk
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030011
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))
Konstantin Porotchkin2ef36a32019-03-31 16:58:11 +030019
20# Convert LLC to secure SRAM
21LLC_SRAM := 0
22$(eval $(call add_define,LLC_SRAM))
23
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030024# Enable/Disable LLC
Konstantin Porotchkin2ef36a32019-03-31 16:58:11 +030025ifeq (${LLC_SRAM}, 0)
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030026LLC_ENABLE := 1
Konstantin Porotchkin2ef36a32019-03-31 16:58:11 +030027else
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
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030034$(eval $(call add_define,LLC_ENABLE))
35
Remi Pommarel7459e742019-07-14 20:34:28 +020036include lib/xlat_tables_v2/xlat_tables.mk
37
Antonio Nino Diaz50a4d1a2019-02-01 12:22:22 +000038PLAT_INCLUDES += -I$(MARVELL_PLAT_INCLUDE_BASE)/common \
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030039 -I$(MARVELL_PLAT_INCLUDE_BASE)/common/aarch64
40
41
Remi Pommarel7459e742019-07-14 20:34:28 +020042PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030043 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_common.c \
Konstantin Porotchkind8e39572018-11-14 17:15:08 +020044 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_helpers.S \
45 $(MARVELL_COMMON_BASE)/marvell_console.c
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030046
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 \
Konstantin Porotchkind973c032018-10-02 17:45:15 +030063 common/desc_image_load.c \
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030064 $(MARVELL_PLAT_BASE)/common/marvell_bl2_setup.c \
Konstantin Porotchkind973c032018-10-02 17:45:15 +030065 $(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
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030069
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