]> git.sur5r.net Git - u-boot/blobdiff - drivers/rtc/m48t35ax.c
net: removed board-specific CONFIGs from MPC5xxx FEC driver
[u-boot] / drivers / rtc / m48t35ax.c
index be29279d0336e3058864c62d4ef27ebbd96a59e9..1482edd607fc3381ce4e560e12e2f86fed087075 100644 (file)
@@ -33,7 +33,7 @@
 #include <rtc.h>
 #include <config.h>
 
-#if defined(CONFIG_RTC_M48T35A) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
 
 static uchar rtc_read  (uchar reg);
 static void  rtc_write (uchar reg, uchar val);
@@ -87,7 +87,7 @@ int rtc_get (struct rtc_time *tmp)
        return 0;
 }
 
-void rtc_set (struct rtc_time *tmp)
+int rtc_set (struct rtc_time *tmp)
 {
        uchar ccr;                      /* Clock control register */
        uchar century;
@@ -116,6 +116,8 @@ void rtc_set (struct rtc_time *tmp)
        ccr = rtc_read(0);
        ccr = ccr & 0x7F;
        rtc_write(0, ccr);
+
+       return 0;
 }
 
 void rtc_reset (void)
@@ -145,14 +147,14 @@ static uchar rtc_read (uchar reg)
 {
        uchar val;
        val = *(unsigned char *)
-               ((CFG_NVRAM_BASE_ADDR + CFG_NVRAM_SIZE - 8) + reg);
+               ((CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE - 8) + reg);
        return val;
 }
 
 static void rtc_write (uchar reg, uchar val)
 {
        *(unsigned char *)
-               ((CFG_NVRAM_BASE_ADDR + CFG_NVRAM_SIZE - 8) + reg) = val;
+               ((CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE - 8) + reg) = val;
 }
 
 static unsigned bcd2bin (uchar n)