diff options
author | Chris Packham <judge.packham@gmail.com> | 2018-03-21 15:40:36 +1300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-04-06 20:45:44 -0400 |
commit | 05d63d8bce1021819e31618c0ddcd12b675884ac (patch) | |
tree | 044e2ab8bc33a99f6de01e26917a47454a97a41e | |
parent | fbd8179cbadd44a9a45ef3eff7c2b5b5aa56938a (diff) | |
download | u-boot-05d63d8bce1021819e31618c0ddcd12b675884ac.tar.gz |
rtc: rs5c372: remove redundant code in rtc_reset
As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the rs5c372 implementation of
rtc_reset() does not need to call rtc_set().
Signed-off-by: Chris Packham <judge.packham@gmail.com>
-rw-r--r-- | drivers/rtc/rs5c372.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/rtc/rs5c372.c b/drivers/rtc/rs5c372.c index 65f45ea5e3..c815c915d5 100644 --- a/drivers/rtc/rs5c372.c +++ b/drivers/rtc/rs5c372.c @@ -247,35 +247,13 @@ int rtc_set (struct rtc_time *tmp) } /* - * Reset the RTC. We set the date back to 1970-01-01. + * Reset the RTC. */ void rtc_reset (void) { - struct rtc_time tmp; - if (!setup_done) rs5c372_enable(); - - if (!setup_done) - return; - - tmp.tm_year = 1970; - tmp.tm_mon = 1; - /* Jan. 1, 1970 was a Thursday */ - tmp.tm_wday= 4; - tmp.tm_mday= 1; - tmp.tm_hour = 0; - tmp.tm_min = 0; - tmp.tm_sec = 0; - - rtc_set(&tmp); - - printf ("RTC: %4d-%02d-%02d %2d:%02d:%02d UTC\n", - tmp.tm_year, tmp.tm_mon, tmp.tm_mday, - tmp.tm_hour, tmp.tm_min, tmp.tm_sec); - - return; } #endif |