summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-06-11 10:43:13 -0600
committerMartin Roth <martinroth@google.com>2016-06-24 20:51:23 +0200
commit850e45f19f498eedd80da4a97a5ce641e2cec6d5 (patch)
tree65acabf7105e6a1fcde394a805b09af5fe0363ba /src/mainboard
parent2622b54936927c8dc7c2cc6b2b7ec2425de96ea4 (diff)
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 <martinroth@chromium.org> Original-Commit-Id: d0361193e0ec135e21f0611d7fa6e5c02f2b2bfc Original-Change-Id: I04a072c788ba3fc915e6d73703f966955bbd3e7e Original-Signed-off-by: Simon Glass <sjg@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/351783 Original-Commit-Ready: Vadim Bendebury <vbendeb@chromium.org> Original-Tested-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://review.coreboot.org/15304 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/gru/mainboard.c14
1 files changed, 14 insertions, 0 deletions
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 <delay.h>
#include <device/device.h>
#include <device/i2c.h>
+#include <ec/google/chromeec/ec.h>
#include <gpio.h>
+#include <rtc.h>
#include <soc/bl31_plat_params.h>
#include <soc/clock.h>
#include <soc/display.h>
@@ -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)