Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 1 | # |
Masahiro Yamada | cd7711d | 2018-01-26 11:42:01 +0900 | [diff] [blame] | 2 | # Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 5 | # |
| 6 | |
Vikram Kanigiri | 18a1731 | 2016-01-14 14:26:27 +0000 | [diff] [blame] | 7 | |
| 8 | # By default, SCP images are needed by CSS platforms. |
| 9 | CSS_LOAD_SCP_IMAGES ?= 1 |
| 10 | |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 11 | # By default, SCMI driver is disabled for CSS platforms |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 12 | CSS_USE_SCMI_SDS_DRIVER ?= 0 |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 13 | |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 14 | PLAT_INCLUDES += -Iinclude/plat/arm/css/common \ |
| 15 | -Iinclude/plat/arm/css/common/aarch64 |
| 16 | |
| 17 | |
Yatharth Kochar | 2694cba | 2016-11-14 12:00:41 +0000 | [diff] [blame] | 18 | PLAT_BL_COMMON_SOURCES += plat/arm/css/common/${ARCH}/css_helpers.S |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 19 | |
Yatharth Kochar | 6089af0 | 2015-10-11 15:03:51 +0100 | [diff] [blame] | 20 | BL1_SOURCES += plat/arm/css/common/css_bl1_setup.c |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 21 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 22 | BL2_SOURCES += plat/arm/css/common/css_bl2_setup.c |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 23 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 24 | BL2U_SOURCES += plat/arm/css/common/css_bl2u_setup.c |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 25 | |
Soby Mathew | 200fffd | 2016-10-21 11:34:59 +0100 | [diff] [blame] | 26 | BL31_SOURCES += plat/arm/css/common/css_pm.c \ |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 27 | plat/arm/css/common/css_topology.c |
| 28 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 29 | ifeq (${CSS_USE_SCMI_SDS_DRIVER},0) |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 30 | BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scpi.c \ |
Samarth Parikh | 59cfa13 | 2017-11-23 14:23:21 +0530 | [diff] [blame] | 31 | plat/arm/css/drivers/mhu/css_mhu.c \ |
Soby Mathew | 200fffd | 2016-10-21 11:34:59 +0100 | [diff] [blame] | 32 | plat/arm/css/drivers/scpi/css_scpi.c |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 33 | else |
| 34 | BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scmi.c \ |
Dimitris Papastamos | aeaf1f0 | 2018-04-03 14:58:17 +0100 | [diff] [blame] | 35 | plat/arm/css/drivers/scmi/scmi_ap_core_proto.c \ |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 36 | plat/arm/css/drivers/scmi/scmi_common.c \ |
| 37 | plat/arm/css/drivers/scmi/scmi_pwr_dmn_proto.c \ |
Samarth Parikh | 59cfa13 | 2017-11-23 14:23:21 +0530 | [diff] [blame] | 38 | plat/arm/css/drivers/scmi/scmi_sys_pwr_proto.c \ |
| 39 | plat/arm/css/drivers/mhu/css_mhu_doorbell.c |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 40 | endif |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 41 | |
| 42 | ifneq (${RESET_TO_BL31},0) |
Juan Castillo | 7d19941 | 2015-12-14 09:35:25 +0000 | [diff] [blame] | 43 | $(error "Using BL31 as the reset vector is not supported on CSS platforms. \ |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 44 | Please set RESET_TO_BL31 to 0.") |
| 45 | endif |
| 46 | |
Vikram Kanigiri | 18a1731 | 2016-01-14 14:26:27 +0000 | [diff] [blame] | 47 | # 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 | |
| 51 | ifeq (${CSS_LOAD_SCP_IMAGES},1) |
Masahiro Yamada | e76b4f8 | 2017-04-05 19:11:41 +0900 | [diff] [blame] | 52 | NEED_SCP_BL2 := yes |
Vikram Kanigiri | 18a1731 | 2016-01-14 14:26:27 +0000 | [diff] [blame] | 53 | ifneq (${TRUSTED_BOARD_BOOT},0) |
Masahiro Yamada | 9c5ca52 | 2018-01-26 11:42:01 +0900 | [diff] [blame] | 54 | $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_)) |
Vikram Kanigiri | 18a1731 | 2016-01-14 14:26:27 +0000 | [diff] [blame] | 55 | endif |
| 56 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 57 | 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 Bailleux | 7da652d | 2015-04-13 11:47:48 +0100 | [diff] [blame] | 60 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 61 | 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 Parikh | 59cfa13 | 2017-11-23 14:23:21 +0530 | [diff] [blame] | 65 | plat/arm/css/drivers/mhu/css_mhu.c \ |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 66 | plat/arm/css/drivers/scpi/css_scpi.c |
Sandrine Bailleux | 7da652d | 2015-04-13 11:47:48 +0100 | [diff] [blame] | 67 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 68 | BL2_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c \ |
Samarth Parikh | 59cfa13 | 2017-11-23 14:23:21 +0530 | [diff] [blame] | 69 | plat/arm/css/drivers/mhu/css_mhu.c \ |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 70 | 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 |
| 79 | endif |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 80 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 81 | ifeq (${CSS_USE_SCMI_SDS_DRIVER},1) |
| 82 | PLAT_BL_COMMON_SOURCES += plat/arm/css/drivers/sds/${ARCH}/sds_helpers.S |
| 83 | endif |
Soby Mathew | ea26bad | 2016-11-14 12:25:45 +0000 | [diff] [blame] | 84 | |
Soby Mathew | 1ced6b8 | 2017-06-12 12:37:10 +0100 | [diff] [blame] | 85 | # 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)) |