From: James Liao Date: Fri, 23 Sep 2022 08:37:59 +0000 (+0800) Subject: fix(mt8188): refine gic init flow after system resume X-Git-Tag: baikal/aarch64/sdk5.9~17^2~1 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=210ebbb0a6a0520cb3a5930c4fefa94baee33462;p=arm-tf.git fix(mt8188): refine gic init flow after system resume Call gicv3_distif_init() instead of mt_gic_init() in armv8_2_mcusys_pwr_on_common(). This is to prevent gicv3_rdistif_init() and gicv3_cpuif_enable() from being called twice in the power-on flow. gicv3_rdistif_init() and gicv3_cpuif_enable() are called in later armv8_2_cpu_pwr_on_common(). BUG=b:244215539 TEST=Suspend Resume Test pass Change-Id: Id752c1ccbb9eab277ed6278c2dd90a051a894146 Signed-off-by: Liju-Clr Chen --- diff --git a/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c b/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c index 6caabcdc8..447234a32 100644 --- a/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c +++ b/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c @@ -103,7 +103,7 @@ unsigned int armv8_2_get_pwr_afflv(const psci_power_state_t *state_info) /* MediaTek mcusys power on control interface */ static void armv8_2_mcusys_pwr_on_common(const struct mtk_cpupm_pwrstate *state) { - mt_gic_init(); + gicv3_distif_init(); mt_gic_distif_restore(); gic_sgi_restore_all(); @@ -154,9 +154,8 @@ static void armv8_2_cpu_pwr_on_common(const struct mtk_cpupm_pwrstate *state, un { coordinate_cluster_pwron(); - gicv3_rdistif_on(plat_my_core_pos()); + gicv3_rdistif_init(plat_my_core_pos()); gicv3_cpuif_enable(plat_my_core_pos()); - mt_gic_rdistif_init(); /* If MCUSYS has been powered down then restore GIC redistributor for all CPUs. */ if (IS_PLAT_SYSTEM_RETENTION(state->pwr.afflv)) {