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 <rspangler@chromium.org>
Change-Id: Ic1f509204f502d1ddf87314f0e1582c21c991156
Reviewed-on: https://gerrit.chromium.org/gerrit/26700
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Randall Spangler
2012-07-03 13:09:48 -07:00
committed by Gerrit
parent a60fdbdfcb
commit b4789cf1f7
2 changed files with 2 additions and 3 deletions

View File

@@ -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)

View File

@@ -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);