summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-30 17:46:56 +0800
committerChromeBot <chrome-bot@google.com>2013-06-03 14:32:49 -0700
commit1806f521955623770405778a742d0398cae028a2 (patch)
treeedf42cd312a1d10a78e07b845a4b5d561c369799
parenta47bda8042f988929d6f981944e75146cbab2dd5 (diff)
downloadchrome-ec-1806f521955623770405778a742d0398cae028a2.tar.gz
Print error message before PMU hard reset
Hard-reset triggers a pulse on the PMIC_RESET pin but this is hard to see when debugging. By printing error message explicitly before resetting the board, it's easier to tell why the board is resetting. BUG=chrome-os-partner:19778 TEST=Trivial change. Build and boot on Spring. Make sure system is alive. BRANCH=spring Change-Id: I26b749af2f8760339373c3e4db46c59d7b0d039e Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/57101 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/pmu_tps65090.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c
index bf63998f33..a6a684c280 100644
--- a/common/pmu_tps65090.c
+++ b/common/pmu_tps65090.c
@@ -528,6 +528,8 @@ int pmu_shutdown(void)
#ifdef CONFIG_PMU_HARD_RESET
/* We ran out of tries, so reset the board */
+ CPUTS("PMU shutdown failed. Hard-resetting.\n");
+ cflush();
pmu_hard_reset();
#endif
@@ -621,8 +623,11 @@ void pmu_init(void)
break;
}
- if (failure)
+ if (failure) {
+ CPUTS("Failed to initialize PMU. Hard-resetting.\n");
+ cflush();
pmu_hard_reset();
+ }
}
/* Initializes PMU when power is turned on. This is necessary because the TPS'