From 6b10085733ac20d1274b98374b43999f4ace8d8c Mon Sep 17 00:00:00 2001 From: ChromeOS Developer Date: Fri, 7 Mar 2014 17:16:14 -0800 Subject: Wolf: Shutdown immediately if PP5000 rail goes down unexpectedly BUG=chrome-os-partner:25833 BRANCH=wolf TEST=Trip the PP5000 VR by over-volting the rail. Verify that the system shuts down rather than the EC becoming unresponsive due to loosing PP3300_EC unexpectedly. Check both S0 and S3 cases. Change-Id: Ifcf0cbfe1319cae1a0bdc6ce60c3884423d862d8 Signed-off-by: Dave Parker Reviewed-on: https://chromium-review.googlesource.com/189248 Reviewed-by: Alec Berg --- board/wolf/board.c | 6 +++++- common/chipset_x86_common.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/board/wolf/board.c b/board/wolf/board.c index dac35e237b..7760417ac5 100644 --- a/board/wolf/board.c +++ b/board/wolf/board.c @@ -52,7 +52,11 @@ const struct gpio_info gpio_list[] = { x86_interrupt}, {"PP1350_PGOOD", LM4_GPIO_H, (1<<6), GPIO_INT_BOTH, x86_interrupt}, - {"PP5000_PGOOD", LM4_GPIO_N, (1<<0), GPIO_INT_BOTH, + /* + * Catch PP5000_PGOOD interrupts while in S3 + * (http://crosbug.com/p/25833) + */ + {"PP5000_PGOOD", LM4_GPIO_N, (1<<0), GPIO_INT_BOTH_DSLEEP, x86_interrupt}, {"VCORE_PGOOD", LM4_GPIO_C, (1<<6), GPIO_INT_BOTH, x86_interrupt}, diff --git a/common/chipset_x86_common.c b/common/chipset_x86_common.c index 3b484d3276..f32db93aca 100644 --- a/common/chipset_x86_common.c +++ b/common/chipset_x86_common.c @@ -335,11 +335,11 @@ DECLARE_HOOK(HOOK_AC_CHANGE, x86_ac_change, HOOK_PRIO_DEFAULT); void x86_interrupt(enum gpio_signal signal) { #ifdef BOARD_wolf - /* Catch the PP5000 rail going down in S0 quicky as it is likely the + /* Catch the PP5000 rail going down unexpectedly as it is likely the * PP3300_EC rail is going down with it. (http://crosbug.com/p/25833) */ if (signal == GPIO_PP5000_PGOOD && (gpio_get_level(signal) == 0) && - chipset_in_state(CHIPSET_STATE_ON)) { + (gpio_get_level(GPIO_PP5000_EN) == 1)) { usb_port_all_ports_off(); CPRINTF("[%T Disabled USB ports and triggering shutdown]\n"); chipset_force_shutdown(); -- cgit v1.2.1