plat/sgi: switch to using scmi
authorChandni Cherukuri <chandni.cherukuri@arm.com>
Wed, 1 Aug 2018 10:28:48 +0000 (15:58 +0530)
committerChandni Cherukuri <chandni.cherukuri@arm.com>
Fri, 3 Aug 2018 10:47:33 +0000 (16:17 +0530)
The Arm SGI platforms can switch to using SCMI. So enable support for
SCMI and remove portions of code that would be unused after switching
to SCMI.

Change-Id: Ifd9e1c944745f703da5f970b5daf1be2b07ed14e
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
plat/arm/css/sgi/aarch64/sgi_helper.S
plat/arm/css/sgi/include/platform_def.h
plat/arm/css/sgi/sgi-common.mk
plat/arm/css/sgi/sgi_topology.c

index d6f63ede9112c10d5840ba6b661b1cf920f4a235..dd0fc5bbd26819b4dc626afd3d7f628f3bd3bdec 100644 (file)
@@ -9,29 +9,9 @@
 #include <platform_def.h>
 #include <cortex_a75.h>
 
-       .globl  plat_is_my_cpu_primary
        .globl  plat_arm_calc_core_pos
        .globl  plat_reset_handler
 
-       /* -----------------------------------------------------
-        * unsigned int plat_is_my_cpu_primary (void);
-        *
-        * Find out whether the current cpu is the primary
-        * cpu (applicable only after a cold boot)
-        * -----------------------------------------------------
-        */
-func plat_is_my_cpu_primary
-       mov     x9, x30
-       bl      plat_my_core_pos
-       ldr     x1, =SGI_BOOT_CFG_ADDR
-       ldr     x1, [x1]
-       ubfx    x1, x1, #PLAT_CSS_PRIMARY_CPU_SHIFT, \
-                       #PLAT_CSS_PRIMARY_CPU_BIT_WIDTH
-       cmp     x0, x1
-       cset    w0, eq
-       ret     x9
-endfunc plat_is_my_cpu_primary
-
        /* -----------------------------------------------------
         * unsigned int plat_arm_calc_core_pos(u_register_t mpidr)
         *
index 169ae1b7515cb4a23904dd188fb47a3d0131315f..c645d109e12d401503b13d219f542ea6933e03a8 100644 (file)
                                        CSS_SGI_DEVICE_SIZE,    \
                                        MT_DEVICE | MT_RW | MT_SECURE)
 
-#define PLAT_CSS_SCP_COM_SHARED_MEM_BASE       0x45400000
-#define SGI_BOOT_CFG_ADDR                      0x45410000
-#define PLAT_CSS_PRIMARY_CPU_SHIFT             8
-#define PLAT_CSS_PRIMARY_CPU_BIT_WIDTH         6
-
 /* GIC related constants */
 #define PLAT_ARM_GICD_BASE             0x30000000
 #define PLAT_ARM_GICC_BASE             0x2C000000
index e0996c78df1a587c643b99ff86582516ef3da833..74d255cba50f78f80e7b9f80e4e2077c7dba88b8 100644 (file)
@@ -4,6 +4,8 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
+CSS_USE_SCMI_SDS_DRIVER                :=      1
+
 ENABLE_PLAT_COMPAT             :=      0
 
 CSS_ENT_BASE                   :=      plat/arm/css/sgi
index 1d2e027dfd76af571285526f5d3920032d9d102b..3f6357bd1a96e5e55eb3588f0e071ef3cc171334 100644 (file)
@@ -42,3 +42,12 @@ unsigned int plat_arm_get_cluster_core_count(u_register_t mpidr)
 {
        return sgi_topology.plat_cluster_core_count;
 }
+
+/*******************************************************************************
+ * The array mapping platform core position (implemented by plat_my_core_pos())
+ * to the SCMI power domain ID implemented by SCP.
+ ******************************************************************************/
+const uint32_t plat_css_core_pos_to_scmi_dmn_id_map[32] = {
+       0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,           \
+       16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
+};