From c411396e5547ab591cab0165e20458c0424fcc79 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Wed, 23 Jan 2019 21:08:43 +0000 Subject: [PATCH] plat/arm: mhu: Move to drivers/ folder Change-Id: I656753a1825ea7340a3708b950fa6b57455e9056 Signed-off-by: Antonio Nino Diaz --- .../drivers => drivers/arm/css}/mhu/css_mhu.c | 3 +-- .../arm/css}/mhu/css_mhu_doorbell.c | 3 +-- .../mhu => include/drivers/arm/css}/css_mhu.h | 0 .../drivers/arm/css}/css_mhu_doorbell.h | 0 plat/arm/board/juno/juno_topology.c | 3 +-- plat/arm/board/n1sdp/n1sdp_bl31_setup.c | 3 +-- plat/arm/css/common/css_common.mk | 18 +++++++++--------- plat/arm/css/common/sp_min/css_sp_min.mk | 10 +++++----- plat/arm/css/drivers/scp/css_bom_bootloader.c | 2 +- plat/arm/css/drivers/scpi/css_scpi.c | 2 +- plat/arm/css/sgi/sgi_bl31_setup.c | 3 +-- plat/arm/css/sgm/sgm_bl31_setup.c | 2 +- 12 files changed, 22 insertions(+), 27 deletions(-) rename {plat/arm/css/drivers => drivers/arm/css}/mhu/css_mhu.c (98%) rename {plat/arm/css/drivers => drivers/arm/css}/mhu/css_mhu_doorbell.c (94%) rename {plat/arm/css/drivers/mhu => include/drivers/arm/css}/css_mhu.h (100%) rename {plat/arm/css/drivers/mhu => include/drivers/arm/css}/css_mhu_doorbell.h (100%) diff --git a/plat/arm/css/drivers/mhu/css_mhu.c b/drivers/arm/css/mhu/css_mhu.c similarity index 98% rename from plat/arm/css/drivers/mhu/css_mhu.c rename to drivers/arm/css/mhu/css_mhu.c index 65695d846..b7faf7ed9 100644 --- a/plat/arm/css/drivers/mhu/css_mhu.c +++ b/drivers/arm/css/mhu/css_mhu.c @@ -9,12 +9,11 @@ #include #include +#include #include #include #include -#include "css_mhu.h" - /* SCP MHU secure channel registers */ #define SCP_INTR_S_STAT 0x200 #define SCP_INTR_S_SET 0x208 diff --git a/plat/arm/css/drivers/mhu/css_mhu_doorbell.c b/drivers/arm/css/mhu/css_mhu_doorbell.c similarity index 94% rename from plat/arm/css/drivers/mhu/css_mhu_doorbell.c rename to drivers/arm/css/mhu/css_mhu_doorbell.c index c031efa5e..885874272 100644 --- a/plat/arm/css/drivers/mhu/css_mhu_doorbell.c +++ b/drivers/arm/css/mhu/css_mhu_doorbell.c @@ -7,10 +7,9 @@ #include #include +#include #include -#include "css_mhu_doorbell.h" - void mhu_ring_doorbell(struct scmi_channel_plat_info *plat_info) { MHU_RING_DOORBELL(plat_info->db_reg_addr, diff --git a/plat/arm/css/drivers/mhu/css_mhu.h b/include/drivers/arm/css/css_mhu.h similarity index 100% rename from plat/arm/css/drivers/mhu/css_mhu.h rename to include/drivers/arm/css/css_mhu.h diff --git a/plat/arm/css/drivers/mhu/css_mhu_doorbell.h b/include/drivers/arm/css/css_mhu_doorbell.h similarity index 100% rename from plat/arm/css/drivers/mhu/css_mhu_doorbell.h rename to include/drivers/arm/css/css_mhu_doorbell.h diff --git a/plat/arm/board/juno/juno_topology.c b/plat/arm/board/juno/juno_topology.c index d83bd9aae..ca5c344d6 100644 --- a/plat/arm/board/juno/juno_topology.c +++ b/plat/arm/board/juno/juno_topology.c @@ -4,14 +4,13 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include #include #include #include -#include "../../css/drivers/mhu/css_mhu_doorbell.h" - #if CSS_USE_SCMI_SDS_DRIVER static scmi_channel_plat_info_t juno_scmi_plat_info = { .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE, diff --git a/plat/arm/board/n1sdp/n1sdp_bl31_setup.c b/plat/arm/board/n1sdp/n1sdp_bl31_setup.c index a1669b9ba..18a0deaba 100644 --- a/plat/arm/board/n1sdp/n1sdp_bl31_setup.c +++ b/plat/arm/board/n1sdp/n1sdp_bl31_setup.c @@ -6,11 +6,10 @@ #include +#include #include #include -#include "../../css/drivers/mhu/css_mhu_doorbell.h" - static scmi_channel_plat_info_t n1sdp_scmi_plat_info = { .scmi_mbx_mem = N1SDP_SCMI_PAYLOAD_BASE, .db_reg_addr = PLAT_CSS_MHU_BASE + CSS_SCMI_MHU_DB_REG_OFF, diff --git a/plat/arm/css/common/css_common.mk b/plat/arm/css/common/css_common.mk index b8e974f38..55303f11d 100644 --- a/plat/arm/css/common/css_common.mk +++ b/plat/arm/css/common/css_common.mk @@ -26,16 +26,16 @@ BL31_SOURCES += plat/arm/css/common/css_pm.c \ plat/arm/css/common/css_topology.c ifeq (${CSS_USE_SCMI_SDS_DRIVER},0) -BL31_SOURCES += plat/arm/css/drivers/scp/css_pm_scpi.c \ - plat/arm/css/drivers/mhu/css_mhu.c \ +BL31_SOURCES += drivers/arm/css/mhu/css_mhu.c \ + plat/arm/css/drivers/scp/css_pm_scpi.c \ plat/arm/css/drivers/scpi/css_scpi.c else -BL31_SOURCES += drivers/arm/css/scmi/scmi_ap_core_proto.c \ +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 \ - plat/arm/css/drivers/mhu/css_mhu_doorbell.c + plat/arm/css/drivers/scp/css_pm_scmi.c endif # Process CSS_LOAD_SCP_IMAGES flag @@ -55,12 +55,12 @@ ifeq (${CSS_LOAD_SCP_IMAGES},1) BL2_SOURCES += plat/arm/css/drivers/scp/css_sds.c \ plat/arm/css/drivers/sds/sds.c else - BL2U_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c \ - plat/arm/css/drivers/mhu/css_mhu.c \ + BL2U_SOURCES += drivers/arm/css/mhu/css_mhu.c \ + plat/arm/css/drivers/scp/css_bom_bootloader.c \ plat/arm/css/drivers/scpi/css_scpi.c - BL2_SOURCES += plat/arm/css/drivers/scp/css_bom_bootloader.c \ - plat/arm/css/drivers/mhu/css_mhu.c \ + BL2_SOURCES += drivers/arm/css/mhu/css_mhu.c \ + plat/arm/css/drivers/scp/css_bom_bootloader.c \ plat/arm/css/drivers/scpi/css_scpi.c # Enable option to detect whether the SCP ROM firmware in use predates version # 1.7.0 and therefore, is incompatible. 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 7c2dcf545..53daf1b98 100644 --- a/plat/arm/css/common/sp_min/css_sp_min.mk +++ b/plat/arm/css/common/sp_min/css_sp_min.mk @@ -9,13 +9,13 @@ BL32_SOURCES += plat/arm/css/common/css_pm.c \ plat/arm/css/common/css_topology.c ifeq (${CSS_USE_SCMI_SDS_DRIVER},0) -BL32_SOURCES += plat/arm/css/drivers/scp/css_pm_scpi.c \ - plat/arm/css/drivers/mhu/css_mhu.c \ +BL32_SOURCES += drivers/arm/css/mhu/css_mhu.c \ + plat/arm/css/drivers/scp/css_pm_scpi.c \ plat/arm/css/drivers/scpi/css_scpi.c else -BL32_SOURCES += drivers/arm/css/scmi/scmi_common.c \ +BL32_SOURCES += drivers/arm/css/mhu/css_mhu_doorbell.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 \ - plat/arm/css/drivers/mhu/css_mhu_doorbell.c + plat/arm/css/drivers/scp/css_pm_scmi.c endif diff --git a/plat/arm/css/drivers/scp/css_bom_bootloader.c b/plat/arm/css/drivers/scp/css_bom_bootloader.c index ca40c3066..5fe268d63 100644 --- a/plat/arm/css/drivers/scp/css_bom_bootloader.c +++ b/plat/arm/css/drivers/scp/css_bom_bootloader.c @@ -9,10 +9,10 @@ #include #include +#include #include #include -#include "../mhu/css_mhu.h" #include "../scpi/css_scpi.h" #include "css_scp.h" diff --git a/plat/arm/css/drivers/scpi/css_scpi.c b/plat/arm/css/drivers/scpi/css_scpi.c index d64bfa267..4965c660b 100644 --- a/plat/arm/css/drivers/scpi/css_scpi.c +++ b/plat/arm/css/drivers/scpi/css_scpi.c @@ -9,11 +9,11 @@ #include #include +#include #include #include #include -#include "../mhu/css_mhu.h" #include "css_scpi.h" #define SCPI_SHARED_MEM_SCP_TO_AP PLAT_CSS_SCP_COM_SHARED_MEM_BASE diff --git a/plat/arm/css/sgi/sgi_bl31_setup.c b/plat/arm/css/sgi/sgi_bl31_setup.c index 82d8fed69..bfcb521a3 100644 --- a/plat/arm/css/sgi/sgi_bl31_setup.c +++ b/plat/arm/css/sgi/sgi_bl31_setup.c @@ -10,14 +10,13 @@ #include #include +#include #include #include #include #include -#include "../../css/drivers/mhu/css_mhu_doorbell.h" - sgi_platform_info_t sgi_plat_info; static scmi_channel_plat_info_t sgi575_scmi_plat_info = { diff --git a/plat/arm/css/sgm/sgm_bl31_setup.c b/plat/arm/css/sgm/sgm_bl31_setup.c index d9490b1b6..7e92ac835 100644 --- a/plat/arm/css/sgm/sgm_bl31_setup.c +++ b/plat/arm/css/sgm/sgm_bl31_setup.c @@ -6,11 +6,11 @@ #include #include +#include #include #include #include -#include "../../css/drivers/mhu/css_mhu_doorbell.h" static scmi_channel_plat_info_t sgm775_scmi_plat_info = { .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,