Fix core offlining
- Shut down the CPU properly when requested, so that we can turn it on
properly later.
Change-Id: I24ad354252f8d55a4b4ac2bb45f684964b71149c
diff --git a/plat/mediatek/mt8516/plat_pm.c b/plat/mediatek/mt8516/plat_pm.c
index 2cd21d1..16a16b5 100644
--- a/plat/mediatek/mt8516/plat_pm.c
+++ b/plat/mediatek/mt8516/plat_pm.c
@@ -276,7 +276,7 @@
cluster_id, cpu_id, mmio_read_32(rv));
// spm_hotplug_on(mpidr);
- spmc_cpu_corex_onoff(plat_core_pos_by_mpidr(mpidr), STA_POWER_ON, MODE_SPMC_HW);
+ rc = spmc_cpu_corex_onoff(plat_core_pos_by_mpidr(mpidr), STA_POWER_ON, MODE_SPMC_HW);
return rc;
}
@@ -296,6 +296,7 @@
{
unsigned long mpidr = read_mpidr_el1();
+ spmc_cpu_corex_onoff(plat_core_pos_by_mpidr(mpidr), STA_POWER_DOWN, MODE_AUTO_SHUT_OFF);
/* Prevent interrupts from spuriously waking up this cpu */
gicv2_cpuif_disable();