blob: 56f5733f17703c7895e87c9248843859bd9f655b [file] [log] [blame]
Nariman Poushin0ece80f2018-02-26 06:52:04 +00001#
Vijayenthiran Subramaniamf5cb00f2019-12-27 19:27:57 +05302# Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
Nariman Poushin0ece80f2018-02-26 06:52:04 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include plat/arm/css/sgi/sgi-common.mk
Roberto Vargasb96ee4b2018-08-06 13:35:31 +01008
Chandni Cherukuria3f66132018-08-10 11:17:58 +05309SGI575_BASE = plat/arm/board/sgi575
10
11PLAT_INCLUDES += -I${SGI575_BASE}/include/
12
13SGI_CPU_SOURCES := lib/cpus/aarch64/cortex_a75.S
14
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010015BL1_SOURCES += ${SGI_CPU_SOURCES} \
16 ${SGI575_BASE}/sgi575_err.c
Chandni Cherukuria3f66132018-08-10 11:17:58 +053017
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +053018BL2_SOURCES += ${SGI575_BASE}/sgi575_plat.c \
19 ${SGI575_BASE}/sgi575_security.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010020 ${SGI575_BASE}/sgi575_err.c \
Vijayenthiran Subramaniam22141b62018-10-25 22:20:24 +053021 drivers/arm/tzc/tzc_dmc620.c \
22 lib/utils/mem_region.c \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010023 plat/arm/common/arm_nor_psci_mem_protect.c
24
Chandni Cherukuria3f66132018-08-10 11:17:58 +053025BL31_SOURCES += ${SGI_CPU_SOURCES} \
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +053026 ${SGI575_BASE}/sgi575_plat.c \
Vijayenthiran Subramaniamf5cb00f2019-12-27 19:27:57 +053027 ${SGI575_BASE}/sgi575_topology.c \
Chandni Cherukuria3f66132018-08-10 11:17:58 +053028 drivers/cfi/v2m/v2m_flash.c \
Antonio Nino Diazd7da2f82018-10-10 11:14:44 +010029 lib/utils/mem_region.c \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010030 plat/arm/common/arm_nor_psci_mem_protect.c
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053031
Max Shvetsov06dba292019-12-06 11:50:12 +000032ifeq (${TRUSTED_BOARD_BOOT}, 1)
33BL1_SOURCES += ${SGI575_BASE}/sgi575_trusted_boot.c
34BL2_SOURCES += ${SGI575_BASE}/sgi575_trusted_boot.c
35endif
36
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053037# Add the FDT_SOURCES and options for Dynamic Config
Manish V Badarkhe64616a52020-05-31 08:53:40 +010038FDT_SOURCES += ${SGI575_BASE}/fdts/${PLAT}_fw_config.dts \
39 ${SGI575_BASE}/fdts/${PLAT}_tb_fw_config.dts
40
41FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
42TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053043
Manish V Badarkhe64616a52020-05-31 08:53:40 +010044# Add the FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010045$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053046# Add the TB_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010047$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053048
Chandni Cherukuri29ea98d2018-11-28 11:26:19 +053049FDT_SOURCES += ${SGI575_BASE}/fdts/${PLAT}_nt_fw_config.dts
50NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053051
Chandni Cherukuri29ea98d2018-11-28 11:26:19 +053052# Add the NT_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010053$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
Vijayenthiran Subramaniambc489912019-12-26 17:45:58 +053054
55ifneq ($(CSS_SGI_CHIP_COUNT),1)
56 $(error "Chip count for SGI575 should be 1, currently set to \
57 ${CSS_SGI_CHIP_COUNT}.")
58endif