summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/spi.c
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2023-01-16 15:14:40 +0530
committerSubrata Banik <subratabanik@google.com>2023-01-18 11:51:37 +0000
commitea0c91fdc9e8509ff9168df3ecb7d61525fb925f (patch)
treed714a6c39be7644e43fb674d47d8174f636784aa /src/soc/intel/cannonlake/spi.c
parentffa5ff84702684af7496ce8ad962e0f1c8b060cd (diff)
soc/intel/elkhartlake: Fix incorrect `prev_sleep_state` issue
The patch fixes indication of incorrect `prev_sleep_state` on the next boot after global reset trigger. The existing code misses an important check about `if PCH doesn't set the WAK_STS` while checking power failure. As a result, every early warm/global reset is considered as power failure after looking into the PMC MMIO CON-A register alone (as ignoring the ACPI PM_CTRL.WAK_STS bit). As per the code comment this code logic is expected to check the power failure reason if PCH doesn't set the WAK_STS while waking from G3 state. Without this patch: Observation: Resuming after a warm reset is considered as `prev_sleep_state 5` although the SLP_TYP is zero and WAK_STS bit is set. pm1_sts: 8100 pm1_en: 0000 pm1_cnt: 00000000 GEN_PMCON: d1215238 00002200 .... prev_sleep_state 5 With this patch: Observation: Resuming after a warm reset is considered as `prev_sleep_state 0`. It matches with the SLP_TYP is zero and WAK_STS bit is set. pm1_sts: 8100 pm1_en: 0000 pm1_cnt: 00000000 GEN_PMCON: d1215238 00002200 .... prev_sleep_state 0 Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: Ib43d3402f94f47dc576fb99a6b2a7acf6f0af220 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71982 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/cannonlake/spi.c')
0 files changed, 0 insertions, 0 deletions