From c2b7779d60107a38f635980f74e39e5c68774bd2 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 14 Jul 2016 00:26:50 -0500 Subject: soc/intel/apollolake: provide poweroff() implementation Implement poweroff() by putting the chipset into ACPI S5 state. BUG=chrome-os-partner:54977 Change-Id: I4ee269f03afd252d4bce909a8cc7c64d6270b16e Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/15686 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/pmutil.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c index 874d9ad60c..e23feb2109 100644 --- a/src/soc/intel/apollolake/pmutil.c +++ b/src/soc/intel/apollolake/pmutil.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -413,3 +414,9 @@ void vboot_platform_prepare_reboot(void) const uint16_t port = ACPI_PMIO_BASE + PM1_CNT; outl((inl(port) & ~(SLP_TYP)) | (SLP_TYP_S5 << SLP_TYP_SHIFT), port); } + +void poweroff(void) +{ + enable_pm1_control(SLP_EN | (SLP_TYP_S5 << SLP_TYP_SHIFT)); + halt(); +} -- cgit v1.2.3