diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-05-05 10:42:24 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-05-07 06:06:50 +0000 |
commit | a2c51158fe1d838e51f65603682d75791c003ab6 (patch) | |
tree | 492b37fb01ece25ef41f144a2b18e89e76d61590 /src | |
parent | 89c5553d41bd19683fe03f82edbbafea4eac3c3b (diff) |
sb/intel/common: Fix platform_is_resuming()
platform_is_resuming() was using the wrong register (PM1_STS) to figure
out if the platform was resuming (PM1_CNT).
Change-Id: I1f69dca1da158aae15c6da6d4c898c71d9cdb51f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52930
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/southbridge/intel/common/pmbase.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/southbridge/intel/common/pmbase.c b/src/southbridge/intel/common/pmbase.c index bbd2c25599..d5578fc27e 100644 --- a/src/southbridge/intel/common/pmbase.c +++ b/src/southbridge/intel/common/pmbase.c @@ -80,6 +80,10 @@ int acpi_get_sleep_type(void) return acpi_sleep_from_pm1(read_pmbase32(PM1_CNT)); } +/* + * Note that southbridge_detect_s3_resume clears the sleep state, + * so this may not be used reliable throughout romstage. + */ int platform_is_resuming(void) { u16 reg16 = read_pmbase16(PM1_STS); @@ -87,5 +91,5 @@ int platform_is_resuming(void) if (!(reg16 & WAK_STS)) return 0; - return acpi_sleep_from_pm1(reg16) == ACPI_S3; + return acpi_get_sleep_type() == ACPI_S3; } |