diff options
author | David Hendricks <dhendrix@chromium.org> | 2016-04-08 13:55:58 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-05-20 17:08:34 -0700 |
commit | b14f89cfdbf403af08f27472ac2d3ba355c85490 (patch) | |
tree | db48c77ddd285907224a7946b934da3a43845bbd /power | |
parent | 5219d2f86b151ca942673e88ad58d2bbacae1c46 (diff) | |
download | chrome-ec-b14f89cfdbf403af08f27472ac2d3ba355c85490.tar.gz |
reef: Initial commit
This adds the basic framework for Reef including full GPIO listing,
board config file, and rudimentary functionality. It has not been
fully tested and still has several TODOs/FIXMEs. For now we just need
something that will build and can be incrementally improved.
BUG=chrome-os-partner:53035
BRANCH=none
TEST=EC and AP both boot, seems reasonably stable for now
Change-Id: I4934ad00917e251dd1d7eb759207a92c45a36136
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/339292
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'power')
-rw-r--r-- | power/apollolake.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/power/apollolake.c b/power/apollolake.c index 8e3449da08..86d211486d 100644 --- a/power/apollolake.c +++ b/power/apollolake.c @@ -51,17 +51,22 @@ static int throttle_cpu; /* Throttle CPU? */ static int forcing_coldreset; /* Forced coldreset in progress? */ static int power_s5_up; /* Chipset is sequencing up or down */ -void chipset_force_shutdown(void) +__attribute__((weak)) void chipset_do_shutdown(void) { - if (!forcing_coldreset) - CPRINTS("%s()", __func__); - /* * Disable V5A which de-assert PMIC_EN and causes PMIC to shutdown. */ gpio_set_level(GPIO_V5A_EN, 0); } +void chipset_force_shutdown(void) +{ + if (!forcing_coldreset) + CPRINTS("%s()", __func__); + + chipset_do_shutdown(); +} + void chipset_reset(int cold_reset) { CPRINTS("%s(%d)", __func__, cold_reset); @@ -256,6 +261,7 @@ static enum power_state _power_handle_state(enum power_state state) /* Enable V5A */ gpio_set_level(GPIO_V5A_EN, 1); + msleep(10); if (power_wait_signals(IN_PGOOD_ALL_CORE)) { chipset_force_shutdown(); |