X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=board%2Fetin%2Fdebris%2Fphantom.c;h=fcb4c40eaae9444b1c445f1bf10a4ae919dc694e;hb=6d0f6bcf337c5261c08fabe12982178c2c489d76;hp=18ab5005ef4bc2bbb29a13a0256a8c3bfd458996;hpb=b706d63559aeec352bc72dd86d7d5423c15f6a60;p=karo-tx-uboot.git diff --git a/board/etin/debris/phantom.c b/board/etin/debris/phantom.c index 18ab5005ef..fcb4c40eaa 100644 --- a/board/etin/debris/phantom.c +++ b/board/etin/debris/phantom.c @@ -20,7 +20,7 @@ #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