diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-09-21 18:18:48 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-24 16:22:39 -0700 |
commit | e5f81324833e5f85a20e1eb2a45ad5519ebed968 (patch) | |
tree | 254c5896654dd19cf853f31e63487eb4ad32e66b | |
parent | 4e3bdedf3268839fc3553d35ccda61294ff74dd3 (diff) | |
download | chrome-ec-e5f81324833e5f85a20e1eb2a45ad5519ebed968.tar.gz |
cr50: make sure board resets when cr50 resets
cr50 should pretty much never reset, but when it does, for whatever
reason, the device it is running on must reset as well.
This patch makes every cr50 reset (be it command line induced, or
caused by an exception) a hard reset, such that it re-initializes the
R-box, which in turn causes reset of the entire platform.
CQ-DEPEND=CL:361680
BRANCH=none
BUG=chrome-os-partner:55948
TEST=verified that running commands like 'reset' or 'md 0xf0000'
(which triggers an exception) causes the entire chromebook to reboot.
Change-Id: Ifa160450b9b4c5ef25e512caf1ffdced9c97acd6
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/388007
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | chip/g/system.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chip/g/system.c b/chip/g/system.c index b79af123ce..7ef8e3cf58 100644 --- a/chip/g/system.c +++ b/chip/g/system.c @@ -95,6 +95,15 @@ void system_reset(int flags) /* Disable interrupts to avoid task swaps during reboot */ interrupt_disable(); +#ifdef BOARD_CR50 + /* + * On CR50 we want every reset be hard reset, causing the entire + * chromebook to reboot: we don't want the TPM reset while the AP + * stays up. + */ + GR_PMU_GLOBAL_RESET = GC_PMU_GLOBAL_RESET_KEY; +#else + if (flags & SYSTEM_RESET_HARD) { /* Reset the full microcontroller */ GR_PMU_GLOBAL_RESET = GC_PMU_GLOBAL_RESET_KEY; @@ -124,6 +133,7 @@ void system_reset(int flags) GC_PMU_LOW_POWER_DIS_START_LSB, 1); } +#endif /* ^^^^^^^ BOARD_CR50 Not defined */ /* Wait for reboot; should never return */ asm("wfi"); |