1#
2# Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7$(warning Platform ${PLAT} is deprecated. Some of the features might not work as expected)
8
9include plat/arm/css/sgi/sgi-common.mk
10
11SGI575_BASE		=	plat/arm/board/sgi575
12
13PLAT_INCLUDES		+=	-I${SGI575_BASE}/include/
14
15SGI_CPU_SOURCES		:=	lib/cpus/aarch64/cortex_a75.S
16
17PLAT_BL_COMMON_SOURCES	+=	${CSS_ENT_BASE}/sgi_plat.c
18
19BL1_SOURCES		+=	${SGI_CPU_SOURCES}			\
20				${SGI575_BASE}/sgi575_err.c
21
22BL2_SOURCES		+=	${SGI575_BASE}/sgi575_plat.c		\
23				${SGI575_BASE}/sgi575_security.c	\
24				${SGI575_BASE}/sgi575_err.c		\
25				drivers/arm/tzc/tzc_dmc620.c		\
26				lib/utils/mem_region.c			\
27				plat/arm/common/arm_nor_psci_mem_protect.c
28
29BL31_SOURCES		+=	${SGI_CPU_SOURCES}			\
30				${SGI575_BASE}/sgi575_plat.c		\
31				${SGI575_BASE}/sgi575_topology.c	\
32				drivers/cfi/v2m/v2m_flash.c		\
33				lib/utils/mem_region.c			\
34				plat/arm/common/arm_nor_psci_mem_protect.c
35
36ifeq (${TRUSTED_BOARD_BOOT}, 1)
37BL1_SOURCES		+=	${SGI575_BASE}/sgi575_trusted_boot.c
38BL2_SOURCES		+=	${SGI575_BASE}/sgi575_trusted_boot.c
39endif
40
41# Add the FDT_SOURCES and options for Dynamic Config
42FDT_SOURCES		+=	${SGI575_BASE}/fdts/${PLAT}_fw_config.dts	\
43				${SGI575_BASE}/fdts/${PLAT}_tb_fw_config.dts
44
45FW_CONFIG		:=	${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
46TB_FW_CONFIG		:=	${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
47
48# Add the FW_CONFIG to FIP and specify the same to certtool
49$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
50# Add the TB_FW_CONFIG to FIP and specify the same to certtool
51$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
52
53FDT_SOURCES		+=	${SGI575_BASE}/fdts/${PLAT}_nt_fw_config.dts
54NT_FW_CONFIG		:=	${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
55
56# Add the NT_FW_CONFIG to FIP and specify the same to certtool
57$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
58
59ifneq ($(CSS_SGI_CHIP_COUNT),1)
60 $(error  "Chip count for SGI575 should be 1, currently set to \
61   ${CSS_SGI_CHIP_COUNT}.")
62endif
63
64ifneq ($(CSS_SGI_PLATFORM_VARIANT),0)
65 $(error "CSS_SGI_PLATFORM_VARIANT for SGI575 should always be 0,\
66     currently set to ${CSS_SGI_PLATFORM_VARIANT}.")
67endif
68