diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-08-12 11:28:50 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-12 21:56:54 +0000 |
commit | fe150a64e972dc38c21fac4dc60f47eab1948d9a (patch) | |
tree | da04504bb32822eca1fdea809b0ace5cc7a5a0b7 | |
parent | f4ba3b2fa32a4dd34570c2bc9b5a592727997eae (diff) | |
download | chrome-ec-fe150a64e972dc38c21fac4dc60f47eab1948d9a.tar.gz |
glados: Revise PMIC initialization
- PMIC init can be called from HOOK_INIT now that this happens after the
scheduler has started.
- There's no need to re-initialize the PMIC on sysjump
BUG=None
TEST=Verify glados boots to S0
BRANCH=None
Change-Id: I1839e1bd357759ae2800d812b27bf4e0cd7772b4
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/293012
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | board/glados/board.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/board/glados/board.c b/board/glados/board.c index be33741bcc..dcd44e4afb 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -23,6 +23,7 @@ #include "power_button.h" #include "spi.h" #include "switch.h" +#include "system.h" #include "task.h" #include "temp_sensor.h" #include "timer.h" @@ -199,8 +200,12 @@ const struct button_config buttons[CONFIG_BUTTON_COUNT] = { { 0 }, }; -static void pmic_init(void) +static void board_pmic_init(void) { + /* No need to re-init PMIC since settings are sticky across sysjump */ + if (system_jumped_to_this_image()) + return; + /* * Set V085ACNT / V0.85A Control Register: * Lower power mode = 0.7V. @@ -208,7 +213,7 @@ static void pmic_init(void) */ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x7a); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, pmic_init, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT); /* Initialize board. */ static void board_init(void) |