summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2016-09-23 13:10:43 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-23 21:08:58 -0700
commit35352c8d7973fc43d3de41b33189febc808a1026 (patch)
tree8202da4249b49589352cc779d3b06783f0fff73c
parent0b1745d6f96571bc371143a0006a4ce3d5f4dff4 (diff)
downloadchrome-ec-35352c8d7973fc43d3de41b33189febc808a1026.tar.gz
power: common: Print RTC when changing states.
In order to help correlate EC logs with those from the kernel, it was suggested that the EC could periodically print the RTC time. This commit prints out the RTC time when changing power states. BUG=chrome-os-partner:57731 BRANCH=gru TEST=Build and flash kevin. Boot system up and suspend. Verify that RTC times are logged to the EC console. Change-Id: Ia1ee1ec88c6733f863a703fb3f841ab74b80fcb9 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/388802 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--power/common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/power/common.c b/power/common.c
index 5ec09d72a9..7e213f0569 100644
--- a/power/common.c
+++ b/power/common.c
@@ -169,6 +169,9 @@ void power_set_state(enum power_state new_state)
if (new_state == POWER_G3)
last_shutdown_time = get_time().val;
+ /* Print out the RTC value to help correlate EC and kernel logs. */
+ print_system_rtc(CC_CHIPSET);
+
state = new_state;
/*