diff options
-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: |