]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/rtc/ds1302.c
update to 2015.04-rc1
[karo-tx-uboot.git] / drivers / rtc / ds1302.c
index e4e9154754e8560d1e352fc51e877c35cf1246b9..87ddd019168b701eb128bf17ff54dd6282f88829 100644 (file)
@@ -9,7 +9,7 @@
 #include <command.h>
 #include <rtc.h>
 
-#if defined(CONFIG_RTC_DS1302) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
 
 /* GPP Pins */
 #define DATA           0x200
@@ -287,8 +287,7 @@ rtc_get(struct rtc_time *tmp)
        return rel;
 }
 
-void
-rtc_set(struct rtc_time *tmp)
+int rtc_set(struct rtc_time *tmp)
 {
        struct ds1302_st bbclk;
        unsigned char b=0;
@@ -326,6 +325,8 @@ rtc_set(struct rtc_time *tmp)
 
        write_ser_drv(0x8e,&b,1);           /* disable write protect */
        write_ser_drv(0xbe,(unsigned char *)&bbclk, 8);     /* write burst */
+
+       return 0;
 }
 
 #endif