1# 2# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7 8# By default, SCP images are needed by CSS platforms. 9CSS_LOAD_SCP_IMAGES ?= 1 10 11# By default, SCMI driver is disabled for CSS platforms 12CSS_USE_SCMI_SDS_DRIVER ?= 0 13 14PLAT_INCLUDES += -Iinclude/plat/arm/css/common/aarch64 15 16 17PLAT_BL_COMMON_SOURCES += plat/arm/css/common/${ARCH}/css_helpers.S 18 19BL1_SOURCES += plat/arm/css/common/css_bl1_setup.c 20 21BL2_SOURCES += plat/arm/css/common/css_bl2_setup.c 22 23BL2U_SOURCES += plat/arm/css/common/css_bl2u_setup.c 24 25BL31_SOURCES += plat/arm/css/common/css_pm.c \ 26 plat/arm/css/common/css_topology.c 27 28ifeq (${CSS_USE_SCMI_SDS_DRIVER},0) 29BL31_SOURCES += drivers/arm/css/mhu/css_mhu.c \ 30 drivers/arm/css/scp/css_pm_scpi.c \ 31 drivers/arm/css/scpi/css_scpi.c 32else 33BL31_SOURCES += drivers/arm/css/mhu/css_mhu_doorbell.c \ 34 drivers/arm/css/scmi/scmi_ap_core_proto.c \ 35 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 \ 38 drivers/arm/css/scp/css_pm_scmi.c 39endif 40 41# 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) 46 NEED_SCP_BL2 := yes 47 ifneq (${TRUSTED_BOARD_BOOT},0) 48 $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_)) 49 endif 50 51 ifeq (${CSS_USE_SCMI_SDS_DRIVER},1) 52 BL2U_SOURCES += drivers/arm/css/scp/css_sds.c \ 53 drivers/arm/css/sds/sds.c 54 55 BL2_SOURCES += drivers/arm/css/scp/css_sds.c \ 56 drivers/arm/css/sds/sds.c 57 else 58 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 61 62 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 65 # 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 74 75ifeq (${CSS_USE_SCMI_SDS_DRIVER},1) 76 PLAT_BL_COMMON_SOURCES += drivers/arm/css/sds/${ARCH}/sds_helpers.S 77endif 78 79# 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)) 82 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 91