blob: 29dd01d19c340c04a0dfab174bba7d08fb8d9bbc [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
Dan Handley9df48042015-03-19 18:58:55 +000014PLAT_INCLUDES += -Iinclude/plat/arm/css/common \
15 -Iinclude/plat/arm/css/common/aarch64
16
17
Yatharth Kochar2694cba2016-11-14 12:00:41 +000018PLAT_BL_COMMON_SOURCES += plat/arm/css/common/${ARCH}/css_helpers.S
Dan Handley9df48042015-03-19 18:58:55 +000019
Yatharth Kochar6089af02015-10-11 15:03:51 +010020BL1_SOURCES += plat/arm/css/common/css_bl1_setup.c
Dan Handley9df48042015-03-19 18:58:55 +000021
Soby Mathew1ced6b82017-06-12 12:37:10 +010022BL2_SOURCES += plat/arm/css/common/css_bl2_setup.c
Dan Handley9df48042015-03-19 18:58:55 +000023
Soby Mathew1ced6b82017-06-12 12:37:10 +010024BL2U_SOURCES += plat/arm/css/common/css_bl2u_setup.c
Dan Handley9df48042015-03-19 18:58:55 +000025
Soby Mathew200fffd2016-10-21 11:34:59 +010026BL31_SOURCES += plat/arm/css/common/css_pm.c \
Soby Mathewea26bad2016-11-14 12:25:45 +000027 plat/arm/css/common/css_topology.c
28
Soby Mathew1ced6b82017-06-12 12:37:10 +010029ifeq (${CSS_USE_SCMI_SDS_DRIVER},0)
Soby Mathewea26bad2016-11-14 12:25:45 +000030BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scpi.c \
Samarth Parikh59cfa132017-11-23 14:23:21 +053031 plat/arm/css/drivers/mhu/css_mhu.c \
Soby Mathew200fffd2016-10-21 11:34:59 +010032 plat/arm/css/drivers/scpi/css_scpi.c
Soby Mathewea26bad2016-11-14 12:25:45 +000033else
34BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scmi.c \
Dimitris Papastamosaeaf1f02018-04-03 14:58:17 +010035 plat/arm/css/drivers/scmi/scmi_ap_core_proto.c \
Soby Mathewea26bad2016-11-14 12:25:45 +000036 plat/arm/css/drivers/scmi/scmi_common.c \
37 plat/arm/css/drivers/scmi/scmi_pwr_dmn_proto.c \
Samarth Parikh59cfa132017-11-23 14:23:21 +053038 plat/arm/css/drivers/scmi/scmi_sys_pwr_proto.c \
39 plat/arm/css/drivers/mhu/css_mhu_doorbell.c
Soby Mathewea26bad2016-11-14 12:25:45 +000040endif
Dan Handley9df48042015-03-19 18:58:55 +000041
42ifneq (${RESET_TO_BL31},0)
Juan Castillo7d199412015-12-14 09:35:25 +000043 $(error "Using BL31 as the reset vector is not supported on CSS platforms. \
Dan Handley9df48042015-03-19 18:58:55 +000044 Please set RESET_TO_BL31 to 0.")
45endif
46
Vikram Kanigiri18a17312016-01-14 14:26:27 +000047# Process CSS_LOAD_SCP_IMAGES flag
48$(eval $(call assert_boolean,CSS_LOAD_SCP_IMAGES))
49$(eval $(call add_define,CSS_LOAD_SCP_IMAGES))
50
51ifeq (${CSS_LOAD_SCP_IMAGES},1)
Masahiro Yamadae76b4f82017-04-05 19:11:41 +090052 NEED_SCP_BL2 := yes
Vikram Kanigiri18a17312016-01-14 14:26:27 +000053 ifneq (${TRUSTED_BOARD_BOOT},0)
Masahiro Yamada9c5ca522018-01-26 11:42:01 +090054 $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_))
Vikram Kanigiri18a17312016-01-14 14:26:27 +000055 endif
56
Soby Mathew1ced6b82017-06-12 12:37:10 +010057 ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
58 BL2U_SOURCES += plat/arm/css/drivers/scp/css_sds.c \
59 plat/arm/css/drivers/sds/sds.c
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010060
Soby Mathew1ced6b82017-06-12 12:37:10 +010061 BL2_SOURCES += plat/arm/css/drivers/scp/css_sds.c \
62 plat/arm/css/drivers/sds/sds.c
63 else
64 BL2U_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c \
Samarth Parikh59cfa132017-11-23 14:23:21 +053065 plat/arm/css/drivers/mhu/css_mhu.c \
Soby Mathew1ced6b82017-06-12 12:37:10 +010066 plat/arm/css/drivers/scpi/css_scpi.c
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010067
Soby Mathew1ced6b82017-06-12 12:37:10 +010068 BL2_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c \
Samarth Parikh59cfa132017-11-23 14:23:21 +053069 plat/arm/css/drivers/mhu/css_mhu.c \
Soby Mathew1ced6b82017-06-12 12:37:10 +010070 plat/arm/css/drivers/scpi/css_scpi.c
71 # Enable option to detect whether the SCP ROM firmware in use predates version
72 # 1.7.0 and therefore, is incompatible.
73 CSS_DETECT_PRE_1_7_0_SCP := 1
74
75 # Process CSS_DETECT_PRE_1_7_0_SCP flag
76 $(eval $(call assert_boolean,CSS_DETECT_PRE_1_7_0_SCP))
77 $(eval $(call add_define,CSS_DETECT_PRE_1_7_0_SCP))
78 endif
79endif
Soby Mathewea26bad2016-11-14 12:25:45 +000080
Soby Mathew1ced6b82017-06-12 12:37:10 +010081ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
82 PLAT_BL_COMMON_SOURCES += plat/arm/css/drivers/sds/${ARCH}/sds_helpers.S
83endif
Soby Mathewea26bad2016-11-14 12:25:45 +000084
Soby Mathew1ced6b82017-06-12 12:37:10 +010085# Process CSS_USE_SCMI_SDS_DRIVER flag
86$(eval $(call assert_boolean,CSS_USE_SCMI_SDS_DRIVER))
87$(eval $(call add_define,CSS_USE_SCMI_SDS_DRIVER))