diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-09-18 18:50:24 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-29 17:42:53 -0700 |
commit | 32549559c05867c9d7f99eb17f51a28e9419b799 (patch) | |
tree | 4f313932ff8f3c1aa116a081040e0bce6d601b8f /power | |
parent | 579605f0afc030ea5c0af85daa8fc5a725d301d8 (diff) | |
download | chrome-ec-32549559c05867c9d7f99eb17f51a28e9419b799.tar.gz |
Fizz: Initialize PMIC after AP power is ready
On proto3, PMIC isn't powered on POR, thus board_pmic_init fails.
With this change, EC waits until AP power is ready before it
notifies HOOK_CHIPSET_PRE_INIT where PMIC will be initialized.
When AP power is ready, PMIC should be ready as well.
BUG=b:65839247,b:64944394
BRANCH=none
TEST=Run reboot [/cold/ap-off] command on BJ and Type-C.
Change-Id: I7e7e07b5acf92167584966ded0a5f14fb6b04f0b
Reviewed-on: https://chromium-review.googlesource.com/672152
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'power')
-rw-r--r-- | power/intel_x86.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/power/intel_x86.c b/power/intel_x86.c index ea0a8dc6c6..6c182344c4 100644 --- a/power/intel_x86.c +++ b/power/intel_x86.c @@ -277,14 +277,6 @@ enum power_state common_intel_x86_power_handle_state(enum power_state state) } #endif - /* Call hooks to initialize PMIC */ - hook_notify(HOOK_CHIPSET_PRE_INIT); - - if (power_wait_signals(CHIPSET_G3S5_POWERUP_SIGNAL)) { - chipset_force_shutdown(); - return POWER_G3; - } - #ifdef CONFIG_VBOOT_EFS /* * We have to test power readiness here (instead of S5->S3) @@ -292,11 +284,17 @@ enum power_state common_intel_x86_power_handle_state(enum power_state state) * which causes (short-powered) system to brown out. */ while (!system_can_boot_ap()) - /* LED blinks as HOOK_TICK events trigger. - * We can print percent & power as they - * improve. */ msleep(200); #endif + + /* Call hooks to initialize PMIC */ + hook_notify(HOOK_CHIPSET_PRE_INIT); + + if (power_wait_signals(CHIPSET_G3S5_POWERUP_SIGNAL)) { + chipset_force_shutdown(); + return POWER_G3; + } + power_s5_up = 1; return POWER_S5; |