From 2d4135e08fb11989a4bbd6ebf9f3c1b324493237 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Wed, 23 Jan 2019 18:55:03 +0000 Subject: [PATCH] plat/arm: scp: Move to drivers/ folder Change-Id: Ida5dae39478654405d0ee31a6cbddb4579e76a7f Signed-off-by: Antonio Nino Diaz --- .../arm/css}/scp/css_bom_bootloader.c | 3 +-- .../arm/css}/scp/css_pm_scmi.c | 3 +-- .../arm/css}/scp/css_pm_scpi.c | 3 +-- .../drivers => drivers/arm/css}/scp/css_sds.c | 2 +- .../scp => include/drivers/arm/css}/css_scp.h | 0 plat/arm/css/common/css_bl2_setup.c | 3 +-- plat/arm/css/common/css_bl2u_setup.c | 3 +-- plat/arm/css/common/css_common.mk | 22 +++++++++---------- plat/arm/css/common/css_pm.c | 3 +-- plat/arm/css/common/sp_min/css_sp_min.mk | 8 +++---- 10 files changed, 22 insertions(+), 28 deletions(-) rename {plat/arm/css/drivers => drivers/arm/css}/scp/css_bom_bootloader.c (99%) rename {plat/arm/css/drivers => drivers/arm/css}/scp/css_pm_scmi.c (99%) rename {plat/arm/css/drivers => drivers/arm/css}/scp/css_pm_scpi.c (99%) rename {plat/arm/css/drivers => drivers/arm/css}/scp/css_sds.c (98%) rename {plat/arm/css/drivers/scp => include/drivers/arm/css}/css_scp.h (100%) diff --git a/plat/arm/css/drivers/scp/css_bom_bootloader.c b/drivers/arm/css/scp/css_bom_bootloader.c similarity index 99% rename from plat/arm/css/drivers/scp/css_bom_bootloader.c rename to drivers/arm/css/scp/css_bom_bootloader.c index 40880da2..1fc1270b 100644 --- a/plat/arm/css/drivers/scp/css_bom_bootloader.c +++ b/drivers/arm/css/scp/css_bom_bootloader.c @@ -10,12 +10,11 @@ #include #include #include +#include #include #include #include -#include "css_scp.h" - /* ID of the MHU slot used for the BOM protocol */ #define BOM_MHU_SLOT_ID 0 diff --git a/plat/arm/css/drivers/scp/css_pm_scmi.c b/drivers/arm/css/scp/css_pm_scmi.c similarity index 99% rename from plat/arm/css/drivers/scp/css_pm_scmi.c rename to drivers/arm/css/scp/css_pm_scmi.c index 2980d9ac..1966c44c 100644 --- a/plat/arm/css/drivers/scp/css_pm_scmi.c +++ b/drivers/arm/css/scp/css_pm_scmi.c @@ -9,14 +9,13 @@ #include #include +#include #include #include #include #include #include -#include "css_scp.h" - /* * This file implements the SCP helper functions using SCMI protocol. */ diff --git a/plat/arm/css/drivers/scp/css_pm_scpi.c b/drivers/arm/css/scp/css_pm_scpi.c similarity index 99% rename from plat/arm/css/drivers/scp/css_pm_scpi.c rename to drivers/arm/css/scp/css_pm_scpi.c index 7e228169..b4019ce0 100644 --- a/plat/arm/css/drivers/scp/css_pm_scpi.c +++ b/drivers/arm/css/scp/css_pm_scpi.c @@ -8,12 +8,11 @@ #include #include +#include #include #include #include -#include "css_scp.h" - /* * This file implements the SCP power management functions using SCPI protocol. */ diff --git a/plat/arm/css/drivers/scp/css_sds.c b/drivers/arm/css/scp/css_sds.c similarity index 98% rename from plat/arm/css/drivers/scp/css_sds.c rename to drivers/arm/css/scp/css_sds.c index e3f6102f..2bfe7501 100644 --- a/plat/arm/css/drivers/scp/css_sds.c +++ b/drivers/arm/css/scp/css_sds.c @@ -9,11 +9,11 @@ #include #include +#include #include #include #include -#include "css_scp.h" #include "../sds/sds.h" int css_scp_boot_image_xfer(void *image, unsigned int image_size) diff --git a/plat/arm/css/drivers/scp/css_scp.h b/include/drivers/arm/css/css_scp.h similarity index 100% rename from plat/arm/css/drivers/scp/css_scp.h rename to include/drivers/arm/css/css_scp.h diff --git a/plat/arm/css/common/css_bl2_setup.c b/plat/arm/css/common/css_bl2_setup.c index 1538e297..002c6eb9 100644 --- a/plat/arm/css/common/css_bl2_setup.c +++ b/plat/arm/css/common/css_bl2_setup.c @@ -8,13 +8,12 @@ #include #include +#include #include #include #include #include -#include "../drivers/scp/css_scp.h" - /* Weak definition may be overridden in specific CSS based platform */ #pragma weak plat_arm_bl2_handle_scp_bl2 diff --git a/plat/arm/css/common/css_bl2u_setup.c b/plat/arm/css/common/css_bl2u_setup.c index c3b4f2b3..15cf4f66 100644 --- a/plat/arm/css/common/css_bl2u_setup.c +++ b/plat/arm/css/common/css_bl2u_setup.c @@ -6,11 +6,10 @@ #include #include +#include #include #include -#include "../drivers/scp/css_scp.h" - /* Weak definition may be overridden in specific CSS based platform */ #pragma weak bl2u_plat_handle_scp_bl2u diff --git a/plat/arm/css/common/css_common.mk b/plat/arm/css/common/css_common.mk index 36da7320..fba9cdce 100644 --- a/plat/arm/css/common/css_common.mk +++ b/plat/arm/css/common/css_common.mk @@ -27,15 +27,15 @@ BL31_SOURCES += plat/arm/css/common/css_pm.c \ ifeq (${CSS_USE_SCMI_SDS_DRIVER},0) BL31_SOURCES += drivers/arm/css/mhu/css_mhu.c \ - drivers/arm/css/scpi/css_scpi.c \ - plat/arm/css/drivers/scp/css_pm_scpi.c + drivers/arm/css/scp/css_pm_scpi.c \ + drivers/arm/css/scpi/css_scpi.c else BL31_SOURCES += drivers/arm/css/mhu/css_mhu_doorbell.c \ drivers/arm/css/scmi/scmi_ap_core_proto.c \ drivers/arm/css/scmi/scmi_common.c \ drivers/arm/css/scmi/scmi_pwr_dmn_proto.c \ drivers/arm/css/scmi/scmi_sys_pwr_proto.c \ - plat/arm/css/drivers/scp/css_pm_scmi.c + drivers/arm/css/scp/css_pm_scmi.c endif # Process CSS_LOAD_SCP_IMAGES flag @@ -49,19 +49,19 @@ ifeq (${CSS_LOAD_SCP_IMAGES},1) endif ifeq (${CSS_USE_SCMI_SDS_DRIVER},1) - BL2U_SOURCES += plat/arm/css/drivers/scp/css_sds.c \ + BL2U_SOURCES += drivers/arm/css/scp/css_sds.c \ plat/arm/css/drivers/sds/sds.c - BL2_SOURCES += plat/arm/css/drivers/scp/css_sds.c \ + BL2_SOURCES += drivers/arm/css/scp/css_sds.c \ plat/arm/css/drivers/sds/sds.c else - BL2U_SOURCES += drivers/arm/css/mhu/css_mhu.c \ - drivers/arm/css/scpi/css_scpi.c \ - plat/arm/css/drivers/scp/css_bom_bootloader.c + BL2U_SOURCES += drivers/arm/css/mhu/css_mhu.c \ + drivers/arm/css/scp/css_bom_bootloader.c \ + drivers/arm/css/scpi/css_scpi.c - BL2_SOURCES += drivers/arm/css/mhu/css_mhu.c \ - drivers/arm/css/scpi/css_scpi.c \ - plat/arm/css/drivers/scp/css_bom_bootloader.c + BL2_SOURCES += drivers/arm/css/mhu/css_mhu.c \ + drivers/arm/css/scp/css_bom_bootloader.c \ + drivers/arm/css/scpi/css_scpi.c # Enable option to detect whether the SCP ROM firmware in use predates version # 1.7.0 and therefore, is incompatible. CSS_DETECT_PRE_1_7_0_SCP := 1 diff --git a/plat/arm/css/common/css_pm.c b/plat/arm/css/common/css_pm.c index 47412dfa..f6fc6aa7 100644 --- a/plat/arm/css/common/css_pm.c +++ b/plat/arm/css/common/css_pm.c @@ -11,13 +11,12 @@ #include #include +#include #include #include #include #include -#include "../drivers/scp/css_scp.h" - /* Allow CSS platforms to override `plat_arm_psci_pm_ops` */ #pragma weak plat_arm_psci_pm_ops diff --git a/plat/arm/css/common/sp_min/css_sp_min.mk b/plat/arm/css/common/sp_min/css_sp_min.mk index a7c61be8..6523a164 100644 --- a/plat/arm/css/common/sp_min/css_sp_min.mk +++ b/plat/arm/css/common/sp_min/css_sp_min.mk @@ -10,12 +10,12 @@ BL32_SOURCES += plat/arm/css/common/css_pm.c \ ifeq (${CSS_USE_SCMI_SDS_DRIVER},0) BL32_SOURCES += drivers/arm/css/mhu/css_mhu.c \ - drivers/arm/css/scpi/css_scpi.c \ - plat/arm/css/drivers/scp/css_pm_scpi.c + drivers/arm/css/scp/css_pm_scpi.c \ + drivers/arm/css/scpi/css_scpi.c else BL32_SOURCES += drivers/arm/css/mhu/css_mhu_doorbell.c \ + drivers/arm/css/scp/css_pm_scmi.c \ drivers/arm/css/scmi/scmi_common.c \ drivers/arm/css/scmi/scmi_pwr_dmn_proto.c \ - drivers/arm/css/scmi/scmi_sys_pwr_proto.c \ - plat/arm/css/drivers/scp/css_pm_scmi.c + drivers/arm/css/scmi/scmi_sys_pwr_proto.c endif -- 2.30.2