s5j/rtc: reset BCDMON and BCDDAY explicitly
authorHeesub Shin <heesub.shin@samsung.com>
Tue, 25 Apr 2017 14:23:09 +0000 (23:23 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Wed, 26 Apr 2017 14:18:33 +0000 (23:18 +0900)
commit0022402bf2ee4163014702299f63ad05169d1b62
tree8c3edb0b062567593dc797f70c44b145651f998b
parenta9a2f826ef8ee1da1b817633fc4b5aca108ae1cc
s5j/rtc: reset BCDMON and BCDDAY explicitly

BCDMON and BCDDAY are set to zero on power-on-reset, which is completely
invalid. This is a kind of hardware errata. Both should be initialized
to 1. This is problematic when we convert RTC time to timespec, because
it leads to underflow. To workaround this problem, we need to explicitly
initialize them to a valid value at boot.

Change-Id: Iab956102cb280211a8a17f9955f23c0e8132a937
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
os/arch/arm/src/s5j/s5j_rtc.c