diff options
author | Evan Green <evgreen@chromium.org> | 2022-05-02 12:22:51 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-05-05 14:20:08 +0000 |
commit | 7ef5158c7db3e1872861fe09ea147f0511099630 (patch) | |
tree | 90683dcae225f8028c1b01b222f28c5706aa07c6 /src/soc/intel | |
parent | 4852c114063e80b27a7a1ea4b5afcc19ec4d632b (diff) |
soc/intel: Return ACPI_S4 as previous sleep state
pmc_prev_sleep_state() isn't handling the case where acpi_sleep_from_pm1()
returns ACPI_S4. Pass that value along so it can get set as a
prev_sleep_state. Without this, consumers see prev_sleep_state as 0
and always treat resume as a cold boot. With this, consumers can
correctly do behavior specific to S4 resume, like skipping the
disconnect IPC command to the PMC on Alderlake systems.
BUG=b:230031158
TEST=Resume from S4 on Primus4es
Signed-off-by: Evan Green <evgreen@chromium.org>
Change-Id: I3fb3dc428a749db80293e51a04a2096514a7b689
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64002
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/common/block/pmc/pmclib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index a2e3e9e1cc..a733920139 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -399,6 +399,9 @@ static int pmc_prev_sleep_state(const struct chipset_power_state *ps) if (CONFIG(HAVE_ACPI_RESUME)) prev_sleep_state = ACPI_S3; break; + case ACPI_S4: + prev_sleep_state = ACPI_S4; + break; case ACPI_S5: prev_sleep_state = ACPI_S5; break; |