aboutsummaryrefslogtreecommitdiff
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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c
index 16c8a0459a..9340ba53d2 100644
--- a/src/soc/intel/apollolake/pmutil.c
+++ b/src/soc/intel/apollolake/pmutil.c
@@ -26,6 +26,7 @@
#include <soc/pm.h>
#include <device/device.h>
#include <device/pci.h>
+#include <vendorcode/google/chromeos/vboot_common.h>
static uintptr_t read_pmc_mmio_bar(void)
{
@@ -336,3 +337,14 @@ int fill_power_state(struct chipset_power_state *ps)
printk(BIOS_DEBUG, "prev_sleep_state %d\n", ps->prev_sleep_state);
return ps->prev_sleep_state;
}
+
+int vboot_platform_is_resuming(void)
+{
+ int typ;
+
+ if (!(inw(ACPI_PMIO_BASE + PM1_STS) & WAK_STS))
+ return 0;
+
+ typ = (inl(ACPI_PMIO_BASE + PM1_CNT) & SLP_TYP) >> SLP_TYP_SHIFT;
+ return typ == SLP_TYP_S3;
+}