summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/pmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/stoneyridge/pmutil.c')
-rw-r--r--src/soc/amd/stoneyridge/pmutil.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/amd/stoneyridge/pmutil.c b/src/soc/amd/stoneyridge/pmutil.c
index 89d3640801..25c9ec15c1 100644
--- a/src/soc/amd/stoneyridge/pmutil.c
+++ b/src/soc/amd/stoneyridge/pmutil.c
@@ -13,6 +13,9 @@
* GNU General Public License for more details.
*/
+#include <arch/acpi.h>
+#include <soc/southbridge.h>
+#include <security/vboot/vboot_common.h>
#include <security/vboot/vbnv.h>
int vbnv_cmos_failed(void)
@@ -20,3 +23,11 @@ int vbnv_cmos_failed(void)
/* FIXME: RTC failure checking not supported. */
return 0;
}
+
+int vboot_platform_is_resuming(void)
+{
+ if (!(inw(pm_acpi_pm_evt_blk()) & WAK_STS))
+ return 0;
+
+ return acpi_sleep_from_pm1(inw(pm_acpi_pm_cnt_blk())) == ACPI_S3;
+}