summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-03 13:09:48 -0700
committerGerrit <chrome-bot@google.com>2012-07-03 23:51:16 -0700
commitb4789cf1f731d120f074831dc4b9552f6bcb8163 (patch)
treecdf8523d26cd23be0de2746f4db03f0a206c3ebf
parenta60fdbdfcb73b521e91006eda46c2c47bf2a51f1 (diff)
downloadchrome-ec-b4789cf1f731d120f074831dc4b9552f6bcb8163.tar.gz
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>
-rw-r--r--chip/lm4/power_button.c2
-rw-r--r--common/x86_power.c3
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);