diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2018-04-24 18:07:14 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-04-26 06:58:27 +0000 |
commit | 225b03534c81e2beb696f51175f14fd352f3090b (patch) | |
tree | 2a9b6a5efcdfca69449118be1ac8a1a25d1a3678 | |
parent | 963419a312e283c28f8f788303a1ddceb1e20a05 (diff) |
soc/amd/stoneyridge: Fix smi_write32 arg order in disable_all_smi_status
The argument order for smi_write32() is offset, value. Current code had
it backwards.
So, when disable_all_smi_status() was called by sb_slp_typ_handler(),
instead of clearing pending flag SlpTypeEvent65 (0x2) in SMIx88 SmiStatus2
by writing 0x00000002 to 0xfed80288, it would instead write
0x00000088 to 0xfed80202 - clearing the lower 2 bytes of SMIx04
Event_Enable, which disabled the lower 16 GPEs from waking the system from S3.
Thus, the EC events (Keyboard / lid switch) [GPE15] and touchpad [GPE7]
did not work as wake up sources.
BUG=b:78461678
TEST=powerd_dbus_suspend, tapping any key on keyboard wakes from S3.
Change-Id: Ie4fbe6db1bb73f603dcf409117fcce93479a1f46
Fixes:081851a9e4 ("amd/stoneyridge: Add SlpTyp SMI handler")
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/25815
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r-- | src/soc/amd/stoneyridge/smihandler.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/stoneyridge/smihandler.c b/src/soc/amd/stoneyridge/smihandler.c index 606378966e..ef24baaac4 100644 --- a/src/soc/amd/stoneyridge/smihandler.c +++ b/src/soc/amd/stoneyridge/smihandler.c @@ -112,12 +112,12 @@ static void sb_apmc_smi_handler(void) static void disable_all_smi_status(void) { - smi_write32(smi_read32(SMI_SCI_STATUS), SMI_SCI_STATUS); - smi_write32(smi_read32(SMI_REG_SMISTS0), SMI_REG_SMISTS0); - smi_write32(smi_read32(SMI_REG_SMISTS1), SMI_REG_SMISTS1); - smi_write32(smi_read32(SMI_REG_SMISTS2), SMI_REG_SMISTS2); - smi_write32(smi_read32(SMI_REG_SMISTS3), SMI_REG_SMISTS3); - smi_write32(smi_read32(SMI_REG_SMISTS4), SMI_REG_SMISTS4); + smi_write32(SMI_SCI_STATUS, smi_read32(SMI_SCI_STATUS)); + smi_write32(SMI_REG_SMISTS0, smi_read32(SMI_REG_SMISTS0)); + smi_write32(SMI_REG_SMISTS1, smi_read32(SMI_REG_SMISTS1)); + smi_write32(SMI_REG_SMISTS2, smi_read32(SMI_REG_SMISTS2)); + smi_write32(SMI_REG_SMISTS3, smi_read32(SMI_REG_SMISTS3)); + smi_write32(SMI_REG_SMISTS4, smi_read32(SMI_REG_SMISTS4)); } static void sb_slp_typ_handler(void) |