]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/rtc/ds1306.c
mx6: clock: use setup_gpmi_io_clk() to change nfc clk divider for CONFIG_NAND_MXS
[karo-tx-uboot.git] / drivers / rtc / ds1306.c
index 1ec1837cb4e1e79405d6ba7357d8fc0b51f307f0..7dd3e19028e217b7a5664276c5cd9e8251f983ef 100644 (file)
@@ -110,7 +110,7 @@ int rtc_get (struct rtc_time *tmp)
        immap->im_cpm.cp_pbdat &= ~PB_SPI_CE;   /* Disable DS1306 Chip */
        udelay (10);
 
-       GregorianDay (tmp);     /* Determine the day of week */
+       rtc_calc_weekday(tmp);  /* Determine the day of week */
 
        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,
@@ -180,8 +180,7 @@ int rtc_set (struct rtc_time *tmp)
        {
                ulong tim;
 
-               tim = mktime (tmp->tm_year, tmp->tm_mon, tmp->tm_mday,
-                             tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+               tim = rtc_mktime(tmp);
 
                immap->im_sitk.sitk_rtck = KAPWR_KEY;
                immap->im_sit.sit_rtc = tim;