summaryrefslogtreecommitdiff
path: root/chip/lm4/system.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-04-18 18:57:48 -0700
committerRandall Spangler <rspangler@chromium.org>2012-04-19 11:08:28 -0700
commitee3edc0116ea7720c5a0ab9713cb4b1cdabb45ee (patch)
tree3ea17eb42f700b1903a9d7ea66f9cc1a3ddbef3c /chip/lm4/system.c
parent70f3fcaf8648230a5cd27a9da151494d6df3016f (diff)
downloadchrome-ec-ee3edc0116ea7720c5a0ab9713cb4b1cdabb45ee.tar.gz
Clean up inits
We can clear the reset cause in system pre-init now because of a previous change which preserves it across a sysjump. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=if it boots, it works Change-Id: I1d8b99df5a0be0de9545d22ad1a6b7fb3140f813
Diffstat (limited to 'chip/lm4/system.c')
-rw-r--r--chip/lm4/system.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/chip/lm4/system.c b/chip/lm4/system.c
index 56d0525c0a..f3bcf85a62 100644
--- a/chip/lm4/system.c
+++ b/chip/lm4/system.c
@@ -29,8 +29,9 @@ static void check_reset_cause(void)
enum system_reset_cause_t reset_cause = SYSTEM_RESET_UNKNOWN;
uint32_t raw_reset_cause;
- /* Read the raw reset cause */
+ /* Read and clear the raw reset cause */
raw_reset_cause = LM4_SYSTEM_RESC;
+ LM4_SYSTEM_RESC = 0;
if (hib_status & 0x0d) {
/* the hibernation module wakes up the system */
@@ -132,16 +133,6 @@ int system_pre_init(void)
}
-int system_init(void)
-{
- /* Clear the hardware reset cause, now that we've committed to running
- * this image. */
- LM4_SYSTEM_RESC = 0;
-
- return EC_SUCCESS;
-}
-
-
int system_reset(int is_cold)
{
/* TODO: (crosbug.com/p/7470) support cold boot; this is a