mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 09:31:51 +00:00
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>
31 lines
892 B
C
31 lines
892 B
C
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "registers.h"
|
|
|
|
void jtag_pre_init(void)
|
|
{
|
|
/*
|
|
* We don't need to do anything for JTAG, but if we're resuming from
|
|
* deep sleep we need to undo some stuff as soon as possible and this
|
|
* is the first init function that's called.
|
|
*
|
|
* It doesn't hurt anything if this setup is not needed, but we don't
|
|
* investigate the reset cause until much later (and doing so is
|
|
* destructive), so we'll just do the post-deep-sleep setup every time.
|
|
*/
|
|
|
|
/* Disable the deep sleep triggers */
|
|
GR_PMU_LOW_POWER_DIS = 0;
|
|
GR_PMU_EXITPD_MASK = 0;
|
|
|
|
/* Unfreeze the USB module */
|
|
GWRITE_FIELD(USB, PCGCCTL, STOPPCLK, 0);
|
|
GWRITE_FIELD(USB, PCGCCTL, RSTPDWNMODULE, 0);
|
|
GWRITE_FIELD(USB, PCGCCTL, PWRCLMP, 0);
|
|
|
|
|
|
}
|