summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/pmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/apollolake/pmutil.c')
-rw-r--r--src/soc/intel/apollolake/pmutil.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c
index dabc2683bc..aaa4018683 100644
--- a/src/soc/intel/apollolake/pmutil.c
+++ b/src/soc/intel/apollolake/pmutil.c
@@ -443,5 +443,12 @@ void vboot_platform_prepare_reboot(void)
void poweroff(void)
{
enable_pm1_control(SLP_EN | (SLP_TYP_S5 << SLP_TYP_SHIFT));
- halt();
+
+ /*
+ * Setting SLP_TYP_S5 in PM1 triggers SLP_SMI, which is handled by SMM
+ * to transition to S5 state. If halt is called in SMM, then it prevents
+ * the SMI handler from being triggered and system never enters S5.
+ */
+ if (!ENV_SMM)
+ halt();
}