]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/etin/debris/phantom.c
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / board / etin / debris / phantom.c
index 0b81fc0c3aedbad5f0710beb3fb5665bba639849..fcb4c40eaae9444b1c445f1bf10a4ae919dc694e 100755 (executable)
@@ -18,9 +18,9 @@
 #include <command.h>
 #include <rtc.h>
 
-#if (CONFIG_COMMANDS & CFG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
 
-#define RTC_BASE (CFG_NVRAM_BASE_ADDR + 0x7fff8)
+#define RTC_BASE (CONFIG_SYS_NVRAM_BASE_ADDR + 0x7fff8)
 
 #define RTC_YEAR                ( RTC_BASE + 7 )
 #define RTC_MONTH               ( RTC_BASE + 6 )
@@ -182,7 +182,7 @@ static int get_century_flag(void)
        return flag;
 }
 
-void rtc_get( struct rtc_time *tmp)
+int rtc_get( struct rtc_time *tmp)
 {
        if (phantom_flag < 0)
                phantom_flag = get_phantom_flag();
@@ -250,9 +250,11 @@ void rtc_get( struct rtc_time *tmp)
                tmp->tm_yday = 0;
                tmp->tm_isdst= 0;
        }
+
+       return 0;
 }
 
-void rtc_set( struct rtc_time *tmp )
+int rtc_set( struct rtc_time *tmp )
 {
        if (phantom_flag < 0)
                phantom_flag = get_phantom_flag();
@@ -305,6 +307,8 @@ void rtc_set( struct rtc_time *tmp )
                /* unlock clock registers after read */
                rtc_write( RTC_CONTROLA, ( reg_a  & ~RTC_CA_WRITE ));
        }
+
+       return 0;
 }
 
 #endif