summaryrefslogtreecommitdiff
path: root/services/std_svc/psci/psci_suspend.c
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-04-27 14:46:28 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-05-25 14:00:00 +0100
commitac1cc8eb76c39bca445478c2dffa9cd18829cff4 (patch)
tree33c404b8b2af247e8c6883d43dbbba2df03082a6 /services/std_svc/psci/psci_suspend.c
parente141aa0357fd4977ba874f4f86874e2cadc73498 (diff)
PSCI: Add pwr_domain_pwr_down_wfi() hook in plat_psci_ops
This patch adds a new optional platform hook `pwr_domain_pwr_down_wfi()` in the plat_psci_ops structure. This hook allows the platform to perform platform specific actions including the wfi invocation to enter powerdown. This hook is invoked by both psci_do_cpu_off() and psci_cpu_suspend_start() functions. The porting-guide.md is also updated for the same. This patch also modifies the `psci_power_down_wfi()` function to invoke `plat_panic_handler` incase of panic instead of the busy while loop. Fixes ARM-Software/tf-issues#375 Change-Id: Iba104469a1445ee8d59fb3a6fdd0a98e7f24dfa3
Diffstat (limited to 'services/std_svc/psci/psci_suspend.c')
-rw-r--r--services/std_svc/psci/psci_suspend.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/std_svc/psci/psci_suspend.c b/services/std_svc/psci/psci_suspend.c
index 367bb32a..8c6ab6b4 100644
--- a/services/std_svc/psci/psci_suspend.c
+++ b/services/std_svc/psci/psci_suspend.c
@@ -189,8 +189,13 @@ exit:
if (skip_wfi)
return;
- if (is_power_down_state)
- psci_power_down_wfi();
+ if (is_power_down_state) {
+ /* The function calls below must not return */
+ if (psci_plat_pm_ops->pwr_domain_pwr_down_wfi)
+ psci_plat_pm_ops->pwr_domain_pwr_down_wfi(state_info);
+ else
+ psci_power_down_wfi();
+ }
/*
* We will reach here if only retention/standby states have been