diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2013-11-13 10:58:26 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-11-13 07:07:57 +0000 |
commit | bec6b5c93ca1ab7746deb83d0d0a95a7d1bedb6b (patch) | |
tree | ba631d1000998cfde9b29f26ac427a47eb1dbdd6 | |
parent | 9a568cc1549f60d1f532ae8429af635da4b4502a (diff) | |
download | chrome-ec-bec6b5c93ca1ab7746deb83d0d0a95a7d1bedb6b.tar.gz |
samus: Fix ACOK buffer on chipset state transitions
The ACOK buffer from EC to PCH was not being triggered when
the chipset powers up or down, instead it was only triggering
when AC state was changed.
Since we want it to be driven in S5 I added HOOK_CHIPSET_PRE_INIT
to the power sequence in the G3S5 state transition.
BUG=chrome-os-partner:23752
BRANCH=none
TEST=power on samus proto1b with AC inserted and see PCH_ACOK
go high, power off and see it go low again. Ensure that it is
also changed with AC state transitions.
Change-Id: I4cbe123322e234dc07f10fd1cdff5a8b771a4e02
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176630
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | board/samus/extpower.c | 8 | ||||
-rw-r--r-- | board/samus/power_sequence.c | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/board/samus/extpower.c b/board/samus/extpower.c index 6100a83127..4da7e655a7 100644 --- a/board/samus/extpower.c +++ b/board/samus/extpower.c @@ -45,6 +45,14 @@ static void extpower_buffer_to_pch(void) gpio_set_level(GPIO_PCH_ACOK, extpower_is_present()); } } +DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, extpower_buffer_to_pch, HOOK_PRIO_DEFAULT); + +static void extpower_shutdown(void) +{ + /* Drive ACOK buffer to PCH low when shutting down */ + gpio_set_level(GPIO_PCH_ACOK, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, extpower_shutdown, HOOK_PRIO_DEFAULT); void extpower_interrupt(enum gpio_signal signal) { diff --git a/board/samus/power_sequence.c b/board/samus/power_sequence.c index f6774f2fdd..1f354f5910 100644 --- a/board/samus/power_sequence.c +++ b/board/samus/power_sequence.c @@ -233,6 +233,9 @@ enum x86_state x86_handle_state(enum x86_state state) /* Wait 5ms for SUSCLK to stabilize */ msleep(5); + + /* Call hook to indicate out of G3 state */ + hook_notify(HOOK_CHIPSET_PRE_INIT); return X86_S5; case X86_S5S3: |