diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-11-11 14:45:27 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2014-05-06 18:39:29 +0200 |
commit | 9f83e873f4f0a06a68f68414720e837a69f54184 (patch) | |
tree | 657110cd0bf78d5106502436c87ec2a5ba245da6 /src/soc/intel/baytrail/smihandler.c | |
parent | 59a4cd55782f1148d37f0c2408657ba93deefc86 (diff) | |
download | coreboot-9f83e873f4f0a06a68f68414720e837a69f54184.tar.xz |
baytrail: add GPIO SMI support
GPIOs which trigger SMIs only set the status bits in the ALT_GPIO_SMI
regier. No bits in the SMI_STS register are set. Therefore, the
ALT_GPIO_SMI register needs to be read and cleared on every SMI.
Additionally, the mainboard_gpi_smi() handler needs to be called as
well on every SMI because of this property.
BUG=chrome-os-partner:23505
BRANCH=None
TEST=Built and booted to recovery screen. Typed 'lidclose' on EC
console. SMI occurred which caused the board to be shutdown.
Change-Id: Ic204d8b928a0cb4f51f108a649f374d9f94e4f47
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176391
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/4958
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/intel/baytrail/smihandler.c')
-rw-r--r-- | src/soc/intel/baytrail/smihandler.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/intel/baytrail/smihandler.c b/src/soc/intel/baytrail/smihandler.c index d5f6aa65d3..22b60c42d3 100644 --- a/src/soc/intel/baytrail/smihandler.c +++ b/src/soc/intel/baytrail/smihandler.c @@ -300,7 +300,7 @@ static void southbridge_smi_pm1(void) elog_add_event(ELOG_TYPE_POWER_BUTTON); #endif disable_pm1_control(-1UL); - enable_pm1_control(SLP_EN | (SLP_TYP_S5 << 10)); + enable_pm1_control(SLP_EN | (SLP_TYP_S5 << SLP_TYP_SHIFT)); } } @@ -396,4 +396,8 @@ void southbridge_smi_handler(void) "handler available.\n", i); } } + + /* The GPIO SMI events do not have a status bit in SMI_STS. Therefore, + * these events need to be cleared and checked unconditionally. */ + mainboard_smi_gpi(clear_alt_status()); } |