diff options
author | timothytim <timothytim@google.com> | 2016-08-09 13:01:42 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-13 17:31:34 -0700 |
commit | 8e512d9d7d04f86138086b202265cd67cd4c7f9c (patch) | |
tree | 3e7e363dd10c7bc13901cde3f89db0c40e431b8b | |
parent | 96b0743e1f754ced950c1ecef86b7b05edd7e2f9 (diff) | |
download | chrome-ec-8e512d9d7d04f86138086b202265cd67cd4c7f9c.tar.gz |
Release EC_RST_L in RW after all initialization has completed
Adding a lowest priority hook init function, guaranteed to run after
all other initialization is completed, which is a good time to take
the EC out of reset.
Also moving pin hold release into the same function.
BRANCH=none
BUG=chrome-os-partner:55797
TEST=verified proper reset pulse generated on reef
verified that reef, kevin and gru all boot up as expected
Change-Id: Ic91e871f5040b9aa02a2f11cf76d2d596c48a04c
Signed-off-by: Timothy Chen <timothytim@google.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/367410
Reviewed-by: Marius Schilder <mschilder@chromium.org>
-rw-r--r-- | chip/g/jtag.c | 3 | ||||
-rw-r--r-- | chip/g/rbox.c | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/chip/g/jtag.c b/chip/g/jtag.c index 7632252e40..59a53100e3 100644 --- a/chip/g/jtag.c +++ b/chip/g/jtag.c @@ -26,6 +26,5 @@ void jtag_pre_init(void) GWRITE_FIELD(USB, PCGCCTL, RSTPDWNMODULE, 0); GWRITE_FIELD(USB, PCGCCTL, PWRCLMP, 0); - /* Unfreeze the PINMUX */ - GREG32(PINMUX, HOLD) = 0; + } diff --git a/chip/g/rbox.c b/chip/g/rbox.c index 6fb582dc90..ec10643728 100644 --- a/chip/g/rbox.c +++ b/chip/g/rbox.c @@ -58,7 +58,17 @@ static void enable_interrupts(void) } #endif -void rbox_init(void) +static void rbox_release_ec_reset(void) +{ + /* Let the EC go. */ + GREG32(RBOX, ASSERT_EC_RST) = 0; + + /* And unfreeze the PINMUX */ + GREG32(PINMUX, HOLD) = 0; +} +DECLARE_HOOK(HOOK_INIT, rbox_release_ec_reset, HOOK_PRIO_LAST); + +static void rbox_init(void) { /* Enable RBOX */ clock_enable_module(MODULE_RBOX, 1); |