summaryrefslogtreecommitdiff
path: root/src/mainboard/google/gru/mainboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/gru/mainboard.c')
-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)