aboutsummaryrefslogtreecommitdiff
path: root/plat/mediatek/mt8195/plat_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/mediatek/mt8195/plat_pm.c')
-rw-r--r--plat/mediatek/mt8195/plat_pm.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/plat/mediatek/mt8195/plat_pm.c b/plat/mediatek/mt8195/plat_pm.c
index 522d4437a0..bd8a3faf91 100644
--- a/plat/mediatek/mt8195/plat_pm.c
+++ b/plat/mediatek/mt8195/plat_pm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, MediaTek Inc. All rights reserved.
+ * Copyright (c) 2021-2022, MediaTek Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,13 +13,15 @@
#include <lib/psci/psci.h>
/* platform specific headers */
+#include <plat/common/platform.h>
#include <mt_gic_v3.h>
#include <mtspmc.h>
-#include <plat/common/platform.h>
+#include <plat_dfd.h>
#include <plat_mtk_lpm.h>
#include <plat_params.h>
#include <plat_pm.h>
#include <pmic.h>
+#include <ptp3_common.h>
#include <rtc.h>
/*
@@ -84,10 +86,8 @@ static void plat_cpu_pwron_common(unsigned int cpu,
coordinate_cluster_pwron();
- /* Enable the GIC CPU interface */
- gicv3_rdistif_on(cpu);
- gicv3_cpuif_enable(cpu);
- mt_gic_rdistif_init();
+ /* PTP3 config */
+ ptp3_core_init(cpu);
/*
* If mcusys does power down before then restore
@@ -96,6 +96,9 @@ static void plat_cpu_pwron_common(unsigned int cpu,
if (IS_MCUSYS_OFF_STATE(state)) {
mt_gic_rdistif_restore_all();
} else {
+ gicv3_rdistif_on(cpu);
+ gicv3_cpuif_enable(cpu);
+ mt_gic_rdistif_init();
mt_gic_rdistif_restore();
}
}
@@ -164,6 +167,8 @@ static void plat_mcusys_pwron_common(unsigned int cpu,
mt_gic_distif_restore();
gic_sgi_restore_all();
+ dfd_resume();
+
plat_mt_pm_invoke_no_check(pwr_mcusys_on_finished, cpu, state);
}