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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/15686
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Aaron Durbin 2016-07-14 00:26:50 -05:00
parent 996b15c934
commit c2b7779d60
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include <console/console.h>
#include <rules.h>
#include <device/pci_def.h>
#include <halt.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
@ -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();
}