]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/rtc/mpc8xx.c
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
[karo-tx-uboot.git] / drivers / rtc / mpc8xx.c
index 8d10c0e465e4028bf4fbc4dd2a9f84d3800617e5..1c24e59e425b5fb7795080e000a34cf093de1202 100644 (file)
 #include <command.h>
 #include <rtc.h>
 
-#if defined(CONFIG_RTC_MPC8xx) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
 
 /* ------------------------------------------------------------------------- */
 
-void rtc_get (struct rtc_time *tmp)
+int rtc_get (struct rtc_time *tmp)
 {
-       volatile immap_t *immr = (immap_t *)CFG_IMMR;
+       volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
        ulong tim;
 
        tim = immr->im_sit.sit_rtc;
@@ -47,11 +47,13 @@ void rtc_get (struct rtc_time *tmp)
        debug ( "Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
                tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
                tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+
+       return 0;
 }
 
-void rtc_set (struct rtc_time *tmp)
+int rtc_set (struct rtc_time *tmp)
 {
-       volatile immap_t *immr = (immap_t *)CFG_IMMR;
+       volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
        ulong tim;
 
        debug ( "Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
@@ -63,6 +65,8 @@ void rtc_set (struct rtc_time *tmp)
 
        immr->im_sitk.sitk_rtck = KAPWR_KEY;
        immr->im_sit.sit_rtc = tim;
+
+       return 0;
 }
 
 void rtc_reset (void)