plat/arm: scp: Move to drivers/ folder
Change-Id: Ida5dae39478654405d0ee31a6cbddb4579e76a7f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/plat/arm/css/drivers/scp/css_bom_bootloader.c b/drivers/arm/css/scp/css_bom_bootloader.c
similarity index 98%
rename from plat/arm/css/drivers/scp/css_bom_bootloader.c
rename to drivers/arm/css/scp/css_bom_bootloader.c
index 40880da..1fc1270 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 <arch_helpers.h>
#include <common/debug.h>
#include <drivers/arm/css/css_mhu.h>
+#include <drivers/arm/css/css_scp.h>
#include <drivers/arm/css/css_scpi.h>
#include <plat/common/platform.h>
#include <platform_def.h>
-#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 2980d9a..1966c44 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 <arch_helpers.h>
#include <common/debug.h>
+#include <drivers/arm/css/css_scp.h>
#include <drivers/arm/css/scmi.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/arm/css/common/css_pm.h>
#include <plat/common/platform.h>
#include <platform_def.h>
-#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 98%
rename from plat/arm/css/drivers/scp/css_pm_scpi.c
rename to drivers/arm/css/scp/css_pm_scpi.c
index 7e22816..b4019ce 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 <arch_helpers.h>
#include <common/debug.h>
+#include <drivers/arm/css/css_scp.h>
#include <drivers/arm/css/css_scpi.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/arm/css/common/css_pm.h>
-#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 e3f6102..2bfe750 100644
--- a/plat/arm/css/drivers/scp/css_sds.c
+++ b/drivers/arm/css/scp/css_sds.c
@@ -9,11 +9,11 @@
#include <arch_helpers.h>
#include <common/debug.h>
+#include <drivers/arm/css/css_scp.h>
#include <drivers/delay_timer.h>
#include <plat/common/platform.h>
#include <platform_def.h>
-#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 1538e29..002c6eb 100644
--- a/plat/arm/css/common/css_bl2_setup.c
+++ b/plat/arm/css/common/css_bl2_setup.c
@@ -8,13 +8,12 @@
#include <common/bl_common.h>
#include <common/debug.h>
+#include <drivers/arm/css/css_scp.h>
#include <lib/mmio.h>
#include <lib/utils.h>
#include <plat/arm/common/plat_arm.h>
#include <platform_def.h>
-#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 c3b4f2b..15cf4f6 100644
--- a/plat/arm/css/common/css_bl2u_setup.c
+++ b/plat/arm/css/common/css_bl2u_setup.c
@@ -6,11 +6,10 @@
#include <common/bl_common.h>
#include <common/debug.h>
+#include <drivers/arm/css/css_scp.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h>
-#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 36da732..fba9cdc 100644
--- a/plat/arm/css/common/css_common.mk
+++ b/plat/arm/css/common/css_common.mk
@@ -27,15 +27,15 @@
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 @@
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 47412df..f6fc6aa 100644
--- a/plat/arm/css/common/css_pm.c
+++ b/plat/arm/css/common/css_pm.c
@@ -11,13 +11,12 @@
#include <arch_helpers.h>
#include <common/debug.h>
+#include <drivers/arm/css/css_scp.h>
#include <lib/cassert.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/arm/css/common/css_pm.h>
#include <plat/common/platform.h>
-#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 a7c61be..6523a16 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 @@
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