From b4789cf1f731d120f074831dc4b9552f6bcb8163 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 3 Jul 2012 13:09:48 -0700 Subject: x86power module must init before power button module The power button module now needs to know whether the chipset is in the on state at init-time, in which case it doesn't need to send a power button pulse to the chipset. BUG=chrome-os-partner:11085 TEST=manual 1. power on AP to BIOS screen (e.g., in recovery mode) 2. At EC console, 'sysjump A' 3. system should stay powered on Signed-off-by: Randall Spangler Change-Id: Ic1f509204f502d1ddf87314f0e1582c21c991156 Reviewed-on: https://gerrit.chromium.org/gerrit/26700 Reviewed-by: Simon Glass --- chip/lm4/power_button.c | 2 +- common/x86_power.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chip/lm4/power_button.c b/chip/lm4/power_button.c index 0ca733597b..cf458f9601 100644 --- a/chip/lm4/power_button.c +++ b/chip/lm4/power_button.c @@ -535,7 +535,7 @@ static int power_button_init(void) return EC_SUCCESS; } -DECLARE_HOOK(HOOK_INIT, power_button_init, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_INIT, power_button_init, HOOK_PRIO_DEFAULT + 1); void power_button_interrupt(enum gpio_signal signal) diff --git a/common/x86_power.c b/common/x86_power.c index ef099275ef..6aa98002f8 100644 --- a/common/x86_power.c +++ b/common/x86_power.c @@ -393,14 +393,13 @@ static int x86_power_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, x86_power_init, HOOK_PRIO_DEFAULT); /*****************************************************************************/ /* Task function */ void x86_power_task(void) { - x86_power_init(); - while (1) { CPRINTF("[%T x86 power state %d = %s, in 0x%04x]\n", state, state_names[state], in_signals); -- cgit v1.2.1