From 850e45f19f498eedd80da4a97a5ce641e2cec6d5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 11 Jun 2016 10:43:13 -0600 Subject: gru: Show the current time on start-up Display the current time from the EC. BUG=chrome-os-partner:52220 BRANCH=none TEST=(partial) boot on gru and see output: Date: 1970-01-17 (Saturday) Time: 1:42:44 Then reboot ~10 seconds later and see output: Date: 1970-01-17 (Saturday) Time: 1:42:53 Change-Id: I4288efc56f00e47f7575d0379a44871351da6200 Signed-off-by: Martin Roth Original-Commit-Id: d0361193e0ec135e21f0611d7fa6e5c02f2b2bfc Original-Change-Id: I04a072c788ba3fc915e6d73703f966955bbd3e7e Original-Signed-off-by: Simon Glass Original-Reviewed-on: https://chromium-review.googlesource.com/351783 Original-Commit-Ready: Vadim Bendebury Original-Tested-by: Vadim Bendebury Original-Reviewed-by: Vadim Bendebury Reviewed-on: https://review.coreboot.org/15304 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/mainboard/google/gru/mainboard.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index 0c4489c9a3..55b5486ccc 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -18,7 +18,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -164,6 +166,17 @@ static void setup_usb(void) setup_usb_drd1_dwc3(); } +static void setup_rtc(void) +{ + struct rtc_time time; + int ret; + + /* Show the current time to see that the EC RTC is working */ + google_chromeec_init(); + ret = rtc_get(&time); + rtc_display(&time); +} + static void mainboard_init(device_t dev) { configure_sdmmc(); @@ -173,6 +186,7 @@ static void mainboard_init(device_t dev) setup_usb(); register_reset_to_bl31(); register_poweroff_to_bl31(); + setup_rtc(); } static void enable_backlight_booster(void) -- cgit v1.2.3