aboutsummaryrefslogtreecommitdiff
path: root/plat/rpi
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2019-12-08 20:48:46 +0100
committerJan Kiszka <jan.kiszka@siemens.com>2019-12-09 13:08:20 +0100
commit9e78cb189a1f26be765662a27ed5caf81793cfd1 (patch)
tree65591fa636369156d0836c414e6878e1512057bb /plat/rpi
parent87b582ef5b31c5893a470b61c217931fc7602da3 (diff)
downloadtrusted-firmware-a-9e78cb189a1f26be765662a27ed5caf81793cfd1.tar.gz
rpi3/4: Add support for offlining CPUs
The hooks were populated but the power down left the CPU in limbo-land. What we need to do - until there is a way to actually power off - is to turn off the MMU and enter the spinning loop as if we were cold-booted. This allows the on-call to pick up the CPU again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Change-Id: Iefc7a58424e3578ad3dd355a7bd6eaba4b412699
Diffstat (limited to 'plat/rpi')
-rw-r--r--plat/rpi/common/rpi3_pm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plat/rpi/common/rpi3_pm.c b/plat/rpi/common/rpi3_pm.c
index 8c2d070c44..2a6bf076b0 100644
--- a/plat/rpi/common/rpi3_pm.c
+++ b/plat/rpi/common/rpi3_pm.c
@@ -123,6 +123,15 @@ static void rpi3_pwr_domain_off(const psci_power_state_t *target_state)
#endif
}
+void __dead2 plat_secondary_cold_boot_setup(void);
+
+static void __dead2
+rpi3_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state)
+{
+ disable_mmu_el3();
+ plat_secondary_cold_boot_setup();
+}
+
/*******************************************************************************
* Platform handler called when a power domain is about to be turned on. The
* mpidr determines the CPU to be turned on.
@@ -224,6 +233,7 @@ static void __dead2 rpi3_system_off(void)
static const plat_psci_ops_t plat_rpi3_psci_pm_ops = {
.cpu_standby = rpi3_cpu_standby,
.pwr_domain_off = rpi3_pwr_domain_off,
+ .pwr_domain_pwr_down_wfi = rpi3_pwr_domain_pwr_down_wfi,
.pwr_domain_on = rpi3_pwr_domain_on,
.pwr_domain_on_finish = rpi3_pwr_domain_on_finish,
.system_off = rpi3_system_off,