@@ -289,8 +289,12 @@ void mcpm_cpu_power_down(void)
__mcpm_cpu_down(cpu, cluster);
/* Now we are prepared for power-down, do it: */
- if (cpu_going_down)
- wfi();
+ if (cpu_going_down) {
+ if (platform_ops->wfi_alternative)
+ platform_ops->wfi_alternative(last_man);
+ else
+ wfi();
+ }
/*
* It is possible for a power_up request to happen concurrently
@@ -223,6 +223,7 @@ struct mcpm_platform_ops {
int (*cluster_powerup)(unsigned int cluster);
void (*cpu_suspend_prepare)(unsigned int cpu, unsigned int cluster);
void (*cpu_powerdown_prepare)(unsigned int cpu, unsigned int cluster);
+ void (*wfi_alternative)(bool last_man);
void (*cluster_powerdown_prepare)(unsigned int cluster);
void (*cpu_cache_disable)(void);
void (*cluster_cache_disable)(void);
On some platforms (in particular the Exynos5260) the wfi is not executed directly by the operating system but by trapping into the secure monitor. Signed-off-by: Stuart Menefy <stuart.menefy@mathembedded.com> --- arch/arm/common/mcpm_entry.c | 8 ++++++-- arch/arm/include/asm/mcpm.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-)