blob: 1e4851cd4087b659a202fd2530dca54fda54a2b4 [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001#
Pranav Madhue3173282022-07-27 12:49:24 +05302# Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved.
Dan Handley9df48042015-03-19 18:58:55 +00003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Dan Handley9df48042015-03-19 18:58:55 +00005#
6
Vikram Kanigiri18a17312016-01-14 14:26:27 +00007
8# By default, SCP images are needed by CSS platforms.
9CSS_LOAD_SCP_IMAGES ?= 1
10
Soby Mathewea26bad2016-11-14 12:25:45 +000011# By default, SCMI driver is disabled for CSS platforms
Soby Mathew1ced6b82017-06-12 12:37:10 +010012CSS_USE_SCMI_SDS_DRIVER ?= 0
Soby Mathewea26bad2016-11-14 12:25:45 +000013
Antonio Nino Diazbd7b7402019-01-25 14:30:04 +000014PLAT_INCLUDES += -Iinclude/plat/arm/css/common/aarch64
Dan Handley9df48042015-03-19 18:58:55 +000015
16
Yatharth Kochar2694cba2016-11-14 12:00:41 +000017PLAT_BL_COMMON_SOURCES += plat/arm/css/common/${ARCH}/css_helpers.S
Dan Handley9df48042015-03-19 18:58:55 +000018
Yatharth Kochar6089af02015-10-11 15:03:51 +010019BL1_SOURCES += plat/arm/css/common/css_bl1_setup.c
Dan Handley9df48042015-03-19 18:58:55 +000020
Soby Mathew1ced6b82017-06-12 12:37:10 +010021BL2_SOURCES += plat/arm/css/common/css_bl2_setup.c
Dan Handley9df48042015-03-19 18:58:55 +000022
Soby Mathew1ced6b82017-06-12 12:37:10 +010023BL2U_SOURCES += plat/arm/css/common/css_bl2u_setup.c
Dan Handley9df48042015-03-19 18:58:55 +000024
Soby Mathew200fffd2016-10-21 11:34:59 +010025BL31_SOURCES += plat/arm/css/common/css_pm.c \
Soby Mathewea26bad2016-11-14 12:25:45 +000026 plat/arm/css/common/css_topology.c
27
Soby Mathew1ced6b82017-06-12 12:37:10 +010028ifeq (${CSS_USE_SCMI_SDS_DRIVER},0)
Antonio Nino Diaz1b0c6f12019-01-23 21:08:43 +000029BL31_SOURCES += drivers/arm/css/mhu/css_mhu.c \
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000030 drivers/arm/css/scp/css_pm_scpi.c \
31 drivers/arm/css/scpi/css_scpi.c
Soby Mathewea26bad2016-11-14 12:25:45 +000032else
Antonio Nino Diaz1b0c6f12019-01-23 21:08:43 +000033BL31_SOURCES += drivers/arm/css/mhu/css_mhu_doorbell.c \
34 drivers/arm/css/scmi/scmi_ap_core_proto.c \
Antonio Nino Diazc30db5b2019-01-23 20:37:32 +000035 drivers/arm/css/scmi/scmi_common.c \
36 drivers/arm/css/scmi/scmi_pwr_dmn_proto.c \
37 drivers/arm/css/scmi/scmi_sys_pwr_proto.c \
Pranav Madhub785b842022-07-22 23:46:11 +053038 drivers/delay_timer/delay_timer.c \
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000039 drivers/arm/css/scp/css_pm_scmi.c
Soby Mathewea26bad2016-11-14 12:25:45 +000040endif
Dan Handley9df48042015-03-19 18:58:55 +000041
Vikram Kanigiri18a17312016-01-14 14:26:27 +000042# Process CSS_LOAD_SCP_IMAGES flag
43$(eval $(call assert_boolean,CSS_LOAD_SCP_IMAGES))
44$(eval $(call add_define,CSS_LOAD_SCP_IMAGES))
45
46ifeq (${CSS_LOAD_SCP_IMAGES},1)
Masahiro Yamadae76b4f82017-04-05 19:11:41 +090047 NEED_SCP_BL2 := yes
Vikram Kanigiri18a17312016-01-14 14:26:27 +000048 ifneq (${TRUSTED_BOARD_BOOT},0)
Masahiro Yamada9c5ca522018-01-26 11:42:01 +090049 $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_))
Vikram Kanigiri18a17312016-01-14 14:26:27 +000050 endif
51
Soby Mathew1ced6b82017-06-12 12:37:10 +010052 ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000053 BL2U_SOURCES += drivers/arm/css/scp/css_sds.c \
Antonio Nino Diaz09d58762019-01-23 19:06:55 +000054 drivers/arm/css/sds/sds.c
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010055
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000056 BL2_SOURCES += drivers/arm/css/scp/css_sds.c \
Antonio Nino Diaz09d58762019-01-23 19:06:55 +000057 drivers/arm/css/sds/sds.c
Soby Mathew1ced6b82017-06-12 12:37:10 +010058 else
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000059 BL2U_SOURCES += drivers/arm/css/mhu/css_mhu.c \
60 drivers/arm/css/scp/css_bom_bootloader.c \
61 drivers/arm/css/scpi/css_scpi.c
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010062
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000063 BL2_SOURCES += drivers/arm/css/mhu/css_mhu.c \
64 drivers/arm/css/scp/css_bom_bootloader.c \
65 drivers/arm/css/scpi/css_scpi.c
Soby Mathew1ced6b82017-06-12 12:37:10 +010066 # Enable option to detect whether the SCP ROM firmware in use predates version
67 # 1.7.0 and therefore, is incompatible.
68 CSS_DETECT_PRE_1_7_0_SCP := 1
69
70 # Process CSS_DETECT_PRE_1_7_0_SCP flag
71 $(eval $(call assert_boolean,CSS_DETECT_PRE_1_7_0_SCP))
72 $(eval $(call add_define,CSS_DETECT_PRE_1_7_0_SCP))
73 endif
74endif
Soby Mathewea26bad2016-11-14 12:25:45 +000075
Soby Mathew1ced6b82017-06-12 12:37:10 +010076ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
Antonio Nino Diaz09d58762019-01-23 19:06:55 +000077 PLAT_BL_COMMON_SOURCES += drivers/arm/css/sds/${ARCH}/sds_helpers.S
Soby Mathew1ced6b82017-06-12 12:37:10 +010078endif
Soby Mathewea26bad2016-11-14 12:25:45 +000079
Soby Mathew1ced6b82017-06-12 12:37:10 +010080# Process CSS_USE_SCMI_SDS_DRIVER flag
81$(eval $(call assert_boolean,CSS_USE_SCMI_SDS_DRIVER))
82$(eval $(call add_define,CSS_USE_SCMI_SDS_DRIVER))
Alexei Fedorove9ab9052017-05-25 15:57:18 +010083
84# Process CSS_NON_SECURE_UART flag
85# This undocumented build option is only to enable debug access to the UART
86# from non secure code, which is useful on some platforms.
87# Default (obviously) is off.
88CSS_NON_SECURE_UART := 0
89$(eval $(call assert_boolean,CSS_NON_SECURE_UART))
90$(eval $(call add_define,CSS_NON_SECURE_UART))
91
Pranav Madhue3173282022-07-27 12:49:24 +053092# Process CSS_SYSTEM_GRACEFUL_RESET flag
93# This build option can be used on CSS platforms that require all the CPUs
94# to execute the CPU specific power down sequence to complete a warm reboot
95# sequence in which only the CPUs are power cycled.
96CSS_SYSTEM_GRACEFUL_RESET := 0
97$(eval $(call add_define,CSS_SYSTEM_GRACEFUL_RESET))