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: d0361193e0
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>
This commit is contained in:
parent
2622b54936
commit
850e45f19f
1 changed files with 14 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue