summaryrefslogtreecommitdiff
path: root/plat/arm/css/drivers/scp/css_pm_scmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/arm/css/drivers/scp/css_pm_scmi.c')
-rw-r--r--plat/arm/css/drivers/scp/css_pm_scmi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plat/arm/css/drivers/scp/css_pm_scmi.c b/plat/arm/css/drivers/scp/css_pm_scmi.c
index b4c0a7df..1ca70a24 100644
--- a/plat/arm/css/drivers/scp/css_pm_scmi.c
+++ b/plat/arm/css/drivers/scp/css_pm_scmi.c
@@ -189,7 +189,7 @@ void css_scp_off(const psci_power_state_t *target_state)
*/
void css_scp_on(u_register_t mpidr)
{
- int lvl = 0, ret;
+ int lvl = 0, ret, core_pos;
uint32_t scmi_pwr_state = 0;
for (; lvl <= PLAT_MAX_PWR_LVL; lvl++)
@@ -198,8 +198,11 @@ void css_scp_on(u_register_t mpidr)
SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1);
+ core_pos = plat_core_pos_by_mpidr(mpidr);
+ assert(core_pos >= 0 && core_pos < PLATFORM_CORE_COUNT);
+
ret = scmi_pwr_state_set(scmi_handle,
- plat_css_core_pos_to_scmi_dmn_id_map[plat_core_pos_by_mpidr(mpidr)],
+ plat_css_core_pos_to_scmi_dmn_id_map[core_pos],
scmi_pwr_state);
if (ret != SCMI_E_QUEUED && ret != SCMI_E_SUCCESS) {