plat/arm/sgi: remove unused code
authorChandni Cherukuri <chandni.cherukuri@arm.com>
Tue, 14 Aug 2018 09:55:34 +0000 (15:25 +0530)
committerChandni Cherukuri <chandni.cherukuri@arm.com>
Thu, 18 Oct 2018 10:23:56 +0000 (15:53 +0530)
On SGI platforms, the interconnect is setup by the SCP and so the
existing unused interconnect setup in sgi575 platform code can be
removed. As a result of this, sgi_plat_config.c and sgi_bl1_setup.c
files can be removed as these files are now empty or can be
substainated by the existing weak functions.

Change-Id: I3c883e4d1959d890bf2213a9be01f02551ea3a45
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
plat/arm/css/sgi/include/sgi_plat_config.h [deleted file]
plat/arm/css/sgi/sgi-common.mk
plat/arm/css/sgi/sgi_bl1_setup.c [deleted file]
plat/arm/css/sgi/sgi_bl31_setup.c
plat/arm/css/sgi/sgi_interconnect.c
plat/arm/css/sgi/sgi_plat_config.c [deleted file]
plat/arm/css/sgi/sgi_topology.c

diff --git a/plat/arm/css/sgi/include/sgi_plat_config.h b/plat/arm/css/sgi/include/sgi_plat_config.h
deleted file mode 100644 (file)
index 9b29d74..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __SGI_PLAT_CONFIG_H__
-#define __SGI_PLAT_CONFIG_H__
-
-#include <ccn.h>
-#include <gicv3.h>
-
-/* The type of interconnect */
-typedef enum {
-       ARM_CCI = 0,
-       ARM_CCN,
-       ARM_CMN
-} css_inteconn_type_t;
-
-typedef ccn_desc_t inteconn_desc_t;
-
-/* Interconnect configurations */
-typedef struct css_inteconn_config {
-       css_inteconn_type_t ip_type;
-       const inteconn_desc_t *plat_inteconn_desc;
-} css_inteconn_config_t;
-
-/* Topology configurations */
-typedef struct css_topology {
-       const unsigned char *power_tree;
-       unsigned int plat_cluster_core_count;
-} css_topology_t;
-
-typedef struct css_plat_config {
-       const gicv3_driver_data_t *gic_data;
-       const css_inteconn_config_t *inteconn;
-       const css_topology_t *topology;
-} css_plat_config_t;
-
-void plat_config_init(void);
-css_plat_config_t *get_plat_config(void);
-
-#endif /* __SGI_PLAT_CONFIG_H__ */
index b6383aa7711f5551e9e13b24c5fa91d77a3a384f..bed8e99abd193e04d2435fb5e968a1ac086cf15e 100644 (file)
@@ -33,9 +33,7 @@ ENT_GIC_SOURCES               :=      drivers/arm/gic/common/gic_common.c     \
 PLAT_BL_COMMON_SOURCES +=      ${CSS_ENT_BASE}/sgi_plat.c      \
                                ${CSS_ENT_BASE}/aarch64/sgi_helper.S
 
-BL1_SOURCES            +=      ${INTERCONNECT_SOURCES}                 \
-                               ${CSS_ENT_BASE}/sgi_bl1_setup.c \
-                               ${CSS_ENT_BASE}/sgi_plat_config.c
+BL1_SOURCES            +=      ${INTERCONNECT_SOURCES}
 
 BL2_SOURCES            +=      ${CSS_ENT_BASE}/sgi_security.c          \
                                ${CSS_ENT_BASE}/sgi_image_load.c
@@ -43,8 +41,7 @@ BL2_SOURCES           +=      ${CSS_ENT_BASE}/sgi_security.c          \
 BL31_SOURCES           +=      ${INTERCONNECT_SOURCES}                 \
                                ${ENT_GIC_SOURCES}                      \
                                ${CSS_ENT_BASE}/sgi_bl31_setup.c        \
-                               ${CSS_ENT_BASE}/sgi_topology.c  \
-                               ${CSS_ENT_BASE}/sgi_plat_config.c
+                               ${CSS_ENT_BASE}/sgi_topology.c
 
 ifeq (${RAS_EXTENSION},1)
 BL31_SOURCES           +=      ${CSS_ENT_BASE}/sgi_ras.c
diff --git a/plat/arm/css/sgi/sgi_bl1_setup.c b/plat/arm/css/sgi/sgi_bl1_setup.c
deleted file mode 100644 (file)
index d3d98d9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <bl_common.h>
-#include <debug.h>
-#include <plat_arm.h>
-#include <sgi_plat_config.h>
-#include <soc_css.h>
-
-void bl1_early_platform_setup(void)
-{
-       /* Initialize the platform configuration structure */
-       plat_config_init();
-
-       arm_bl1_early_platform_setup();
-}
index 09f493eddf850c05e2778e8ddc7ec7c1888bf120..395807675d0bb400a4005ece1d19a7fd26d49af9 100644 (file)
@@ -7,15 +7,11 @@
 #include <bl_common.h>
 #include <debug.h>
 #include <plat_arm.h>
-#include <sgi_plat_config.h>
 #include <sgi_ras.h>
 
 void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
                                u_register_t arg2, u_register_t arg3)
 {
-       /* Initialize the platform configuration structure */
-       plat_config_init();
-
        arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
 }
 
index 325b5b1523e5ce8496fd6a1ec44cfaa30e164aa2..074f8a2745726a1875d21409857fc65f887ff216 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <arch_helpers.h>
 #include <debug.h>
-#include <sgi_plat_config.h>
 
 /*
  * For SGI575 which support FCM (with automatic interconnect enter/exit),
diff --git a/plat/arm/css/sgi/sgi_plat_config.c b/plat/arm/css/sgi/sgi_plat_config.c
deleted file mode 100644 (file)
index 29b99a3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <assert.h>
-#include <debug.h>
-#include <plat_arm.h>
-#include <platform_def.h>
-#include <sgi_variant.h>
-#include <sgi_plat_config.h>
-#include <string.h>
-
-static css_plat_config_t *css_plat_info;
-
-/* GIC */
-/* The GICv3 driver only needs to be initialized in EL3 */
-uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT];
-
-/* Interconnect configuration for SGI575 */
-const css_inteconn_config_t sgi575_inteconn = {
-       .ip_type = ARM_CMN,
-       .plat_inteconn_desc = NULL
-};
-
-/* Configuration structure for SGI575 */
-css_plat_config_t sgi575_config = {
-       .inteconn = &sgi575_inteconn,
-};
-
-/*******************************************************************************
- * This function initializes the platform sturcture.
- ******************************************************************************/
-void plat_config_init(void)
-{
-       /* Get the platform configurations */
-       switch (GET_SGI_PART_NUM) {
-       case SGI575_SSC_VER_PART_NUM:
-               css_plat_info = &sgi575_config;
-               break;
-       default:
-               ERROR("Not a valid sgi variant!\n");
-               panic();
-       }
-}
-
-/*******************************************************************************
- * This function returns the platform structure pointer.
- ******************************************************************************/
-css_plat_config_t *get_plat_config(void)
-{
-       assert(css_plat_info != NULL);
-       return css_plat_info;
-}
index 3f6357bd1a96e5e55eb3588f0e071ef3cc171334..3b7a57ad2169c41774a45464c6bb24d676a207f7 100644 (file)
@@ -5,7 +5,6 @@
  */
 
 #include <plat_arm.h>
-#include <sgi_plat_config.h>
 
 /* Topology */
 /*
@@ -20,18 +19,12 @@ const unsigned char sgi_pd_tree_desc[] = {
        CSS_SGI_MAX_CPUS_PER_CLUSTER
 };
 
-/* Topology configuration for sgi platform */
-const css_topology_t sgi_topology = {
-       .power_tree = sgi_pd_tree_desc,
-       .plat_cluster_core_count = CSS_SGI_MAX_CPUS_PER_CLUSTER
-};
-
 /*******************************************************************************
  * This function returns the topology tree information.
  ******************************************************************************/
 const unsigned char *plat_get_power_domain_tree_desc(void)
 {
-       return sgi_topology.power_tree;
+       return sgi_pd_tree_desc;
 }
 
 /*******************************************************************************
@@ -40,7 +33,7 @@ const unsigned char *plat_get_power_domain_tree_desc(void)
  ******************************************************************************/
 unsigned int plat_arm_get_cluster_core_count(u_register_t mpidr)
 {
-       return sgi_topology.plat_cluster_core_count;
+       return CSS_SGI_MAX_CPUS_PER_CLUSTER;
 }
 
 /*******************************************************************************