blob: 2fbbe4560361b19643d4262389f3d605abee66be [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001#
Masahiro Yamadacd7711d2018-01-26 11:42:01 +09002# Copyright (c) 2015-2018, 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 \
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000038 drivers/arm/css/scp/css_pm_scmi.c
Soby Mathewea26bad2016-11-14 12:25:45 +000039endif
Dan Handley9df48042015-03-19 18:58:55 +000040
Vikram Kanigiri18a17312016-01-14 14:26:27 +000041# Process CSS_LOAD_SCP_IMAGES flag
42$(eval $(call assert_boolean,CSS_LOAD_SCP_IMAGES))
43$(eval $(call add_define,CSS_LOAD_SCP_IMAGES))
44
45ifeq (${CSS_LOAD_SCP_IMAGES},1)
Masahiro Yamadae76b4f82017-04-05 19:11:41 +090046 NEED_SCP_BL2 := yes
Vikram Kanigiri18a17312016-01-14 14:26:27 +000047 ifneq (${TRUSTED_BOARD_BOOT},0)
Masahiro Yamada9c5ca522018-01-26 11:42:01 +090048 $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_))
Vikram Kanigiri18a17312016-01-14 14:26:27 +000049 endif
50
Soby Mathew1ced6b82017-06-12 12:37:10 +010051 ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000052 BL2U_SOURCES += drivers/arm/css/scp/css_sds.c \
Antonio Nino Diaz09d58762019-01-23 19:06:55 +000053 drivers/arm/css/sds/sds.c
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010054
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000055 BL2_SOURCES += drivers/arm/css/scp/css_sds.c \
Antonio Nino Diaz09d58762019-01-23 19:06:55 +000056 drivers/arm/css/sds/sds.c
Soby Mathew1ced6b82017-06-12 12:37:10 +010057 else
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000058 BL2U_SOURCES += drivers/arm/css/mhu/css_mhu.c \
59 drivers/arm/css/scp/css_bom_bootloader.c \
60 drivers/arm/css/scpi/css_scpi.c
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010061
Antonio Nino Diaz326f56b2019-01-23 18:55:03 +000062 BL2_SOURCES += drivers/arm/css/mhu/css_mhu.c \
63 drivers/arm/css/scp/css_bom_bootloader.c \
64 drivers/arm/css/scpi/css_scpi.c
Soby Mathew1ced6b82017-06-12 12:37:10 +010065 # Enable option to detect whether the SCP ROM firmware in use predates version
66 # 1.7.0 and therefore, is incompatible.
67 CSS_DETECT_PRE_1_7_0_SCP := 1
68
69 # Process CSS_DETECT_PRE_1_7_0_SCP flag
70 $(eval $(call assert_boolean,CSS_DETECT_PRE_1_7_0_SCP))
71 $(eval $(call add_define,CSS_DETECT_PRE_1_7_0_SCP))
72 endif
73endif
Soby Mathewea26bad2016-11-14 12:25:45 +000074
Soby Mathew1ced6b82017-06-12 12:37:10 +010075ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
Antonio Nino Diaz09d58762019-01-23 19:06:55 +000076 PLAT_BL_COMMON_SOURCES += drivers/arm/css/sds/${ARCH}/sds_helpers.S
Soby Mathew1ced6b82017-06-12 12:37:10 +010077endif
Soby Mathewea26bad2016-11-14 12:25:45 +000078
Soby Mathew1ced6b82017-06-12 12:37:10 +010079# Process CSS_USE_SCMI_SDS_DRIVER flag
80$(eval $(call assert_boolean,CSS_USE_SCMI_SDS_DRIVER))
81$(eval $(call add_define,CSS_USE_SCMI_SDS_DRIVER))
Alexei Fedorove9ab9052017-05-25 15:57:18 +010082
83# Process CSS_NON_SECURE_UART flag
84# This undocumented build option is only to enable debug access to the UART
85# from non secure code, which is useful on some platforms.
86# Default (obviously) is off.
87CSS_NON_SECURE_UART := 0
88$(eval $(call assert_boolean,CSS_NON_SECURE_UART))
89$(eval $(call add_define,CSS_NON_SECURE_UART))
90