Merge tag 'for-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
[oweals/u-boot.git] / drivers / rtc / rs5c372.c
index 1a179beaddee28a9ee721690f930aa22f608541d..97ec001aef56f1cecd3540922874e180ea5f1061 100644 (file)
@@ -16,7 +16,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation. 
+ * published by the Free Software Foundation.
  */
 
 #include <common.h>
@@ -24,7 +24,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
 /*
  * Reads are always done starting with register 15, which requires some
  * jumping-through-hoops to access the data correctly.
@@ -247,35 +246,11 @@ 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