diff options
author | Tom Rini <trini@konsulko.com> | 2020-01-07 16:45:43 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-07 16:45:43 +0300 |
commit | d8a3f5259a36e76d1de127f65714c40918e8ee4c (patch) | |
tree | 6a4ca1942f084a11465ad990433306c2dfdc7b55 /board/ge/common | |
parent | ac0f978afd4b8d388b0b194bc6e5982efc383a59 (diff) | |
parent | b6e7ef4bf71bc0927dea35fdec0a653a82ae57a7 (diff) | |
download | u-boot-d8a3f5259a36e76d1de127f65714c40918e8ee4c.tar.xz |
Merge tag 'u-boot-imx-20200107' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
New for 2020.04
---------------
- New boards
Embedded Artists COM board
Xea Board
- Switch to DM:
Aristainetos boards
Toradex colibri (DM_ETH)
iCubox
GE bx50v3
mx7dsabre (DM_ETH)
cx9020
- New features:
Bootaux with elf files
Default SYS_THUMB_BUILD for i.MX6/7
- Fixes:
DHCOM i.MX6 PDK
Engicam
i.MX8M tools (imx8m_image)
Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/633679664
Diffstat (limited to 'board/ge/common')
-rw-r--r-- | board/ge/common/ge_common.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/board/ge/common/ge_common.c b/board/ge/common/ge_common.c index 501c8b2daf..d7e21deca7 100644 --- a/board/ge/common/ge_common.c +++ b/board/ge/common/ge_common.c @@ -17,8 +17,10 @@ void check_time(void) unsigned int current_i2c_bus = i2c_get_bus_num(); ret = i2c_set_bus_num(CONFIG_SYS_RTC_BUS_NUM); - if (ret < 0) + if (ret < 0) { + env_set("rtc_status", "FAIL"); return; + } rtc_init(); @@ -28,10 +30,7 @@ void check_time(void) break; } - if (ret < 0) - env_set("rtc_status", "RTC_ERROR"); - - if (tm.tm_year > 2037) { + if (!ret && tm.tm_year > 2037) { tm.tm_sec = 0; tm.tm_min = 0; tm.tm_hour = 0; @@ -46,10 +45,17 @@ void check_time(void) break; } - if (ret < 0) - env_set("rtc_status", "RTC_ERROR"); + if (ret >= 0) + ret = 2038; } + if (ret < 0) + env_set("rtc_status", "FAIL"); + else if (ret == 2038) + env_set("rtc_status", "2038"); + else + env_set("rtc_status", "OK"); + i2c_set_bus_num(current_i2c_bus); } |