blob: 9381e4cd2c9b86b14579c70f5e3520c0e778993f [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001#
Soby Mathewea26bad2016-11-14 12:25:45 +00002# Copyright (c) 2015-2017, 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
12CSS_USE_SCMI_DRIVER ?= 0
13
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
22BL2_SOURCES += plat/arm/css/common/css_bl2_setup.c \
Soby Mathew200fffd2016-10-21 11:34:59 +010023 plat/arm/css/drivers/scpi/css_mhu.c \
24 plat/arm/css/drivers/scpi/css_scpi.c
Dan Handley9df48042015-03-19 18:58:55 +000025
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010026BL2U_SOURCES += plat/arm/css/common/css_bl2u_setup.c \
Soby Mathew200fffd2016-10-21 11:34:59 +010027 plat/arm/css/drivers/scpi/css_mhu.c \
28 plat/arm/css/drivers/scpi/css_scpi.c
Dan Handley9df48042015-03-19 18:58:55 +000029
Soby Mathew200fffd2016-10-21 11:34:59 +010030BL31_SOURCES += plat/arm/css/common/css_pm.c \
Soby Mathewea26bad2016-11-14 12:25:45 +000031 plat/arm/css/common/css_topology.c
32
33ifeq (${CSS_USE_SCMI_DRIVER},0)
34BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scpi.c \
Soby Mathew200fffd2016-10-21 11:34:59 +010035 plat/arm/css/drivers/scpi/css_mhu.c \
36 plat/arm/css/drivers/scpi/css_scpi.c
Soby Mathewea26bad2016-11-14 12:25:45 +000037else
38BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scmi.c \
39 plat/arm/css/drivers/scmi/scmi_common.c \
40 plat/arm/css/drivers/scmi/scmi_pwr_dmn_proto.c \
41 plat/arm/css/drivers/scmi/scmi_sys_pwr_proto.c
42endif
Dan Handley9df48042015-03-19 18:58:55 +000043
44ifneq (${RESET_TO_BL31},0)
Juan Castillo7d199412015-12-14 09:35:25 +000045 $(error "Using BL31 as the reset vector is not supported on CSS platforms. \
Dan Handley9df48042015-03-19 18:58:55 +000046 Please set RESET_TO_BL31 to 0.")
47endif
48
Vikram Kanigiri18a17312016-01-14 14:26:27 +000049# Process CSS_LOAD_SCP_IMAGES flag
50$(eval $(call assert_boolean,CSS_LOAD_SCP_IMAGES))
51$(eval $(call add_define,CSS_LOAD_SCP_IMAGES))
52
53ifeq (${CSS_LOAD_SCP_IMAGES},1)
Masahiro Yamadae76b4f82017-04-05 19:11:41 +090054 NEED_SCP_BL2 := yes
Vikram Kanigiri18a17312016-01-14 14:26:27 +000055 ifneq (${TRUSTED_BOARD_BOOT},0)
56 $(eval $(call FWU_FIP_ADD_IMG,SCP_BL2U,--scp-fwu-cfg))
57 endif
58
Soby Mathew73b7bf92017-05-03 12:58:41 +010059 BL2U_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c
60 BL2_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c
Vikram Kanigiri18a17312016-01-14 14:26:27 +000061endif
Sandrine Bailleux7da652d2015-04-13 11:47:48 +010062
63# Enable option to detect whether the SCP ROM firmware in use predates version
64# 1.7.0 and therefore, is incompatible.
65CSS_DETECT_PRE_1_7_0_SCP := 1
66
67# Process CSS_DETECT_PRE_1_7_0_SCP flag
68$(eval $(call assert_boolean,CSS_DETECT_PRE_1_7_0_SCP))
69$(eval $(call add_define,CSS_DETECT_PRE_1_7_0_SCP))
Soby Mathewea26bad2016-11-14 12:25:45 +000070
71# Process CSS_USE_SCMI_DRIVER flag
72$(eval $(call assert_boolean,CSS_USE_SCMI_DRIVER))
73$(eval $(call add_define,CSS_USE_SCMI_DRIVER))
74