summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-05-05 10:39:00 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-05-07 06:06:34 +0000
commit89c5553d41bd19683fe03f82edbbafea4eac3c3b (patch)
tree42334a10f7eaba93cbdb089b058922cea477414b
parent3aee3ad46dd8d415c6236a74b27d15672fd0bb93 (diff)
downloadcoreboot-89c5553d41bd19683fe03f82edbbafea4eac3c3b.tar.gz
coreboot-89c5553d41bd19683fe03f82edbbafea4eac3c3b.tar.bz2
coreboot-89c5553d41bd19683fe03f82edbbafea4eac3c3b.zip
sb/intel/common: Implement acpi_is_wakeup_s3()
acpi_is_wakeup_s3() requires acpi_get_sleep_type(). Change-Id: Ibe01863e685bcbc9652a72be0632cfbd83e18380 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52929 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
-rw-r--r--src/southbridge/intel/common/pmbase.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/southbridge/intel/common/pmbase.c b/src/southbridge/intel/common/pmbase.c
index 265588230fb1..bbd2c25599c9 100644
--- a/src/southbridge/intel/common/pmbase.c
+++ b/src/southbridge/intel/common/pmbase.c
@@ -75,6 +75,11 @@ u8 read_pmbase8(const u8 addr)
return inb(lpc_get_pmbase() + addr);
}
+int acpi_get_sleep_type(void)
+{
+ return acpi_sleep_from_pm1(read_pmbase32(PM1_CNT));
+}
+
int platform_is_resuming(void)
{
u16 reg16 = read_pmbase16(PM1_STS);