]> Git Repo - J-u-boot.git/blobdiff - drivers/rtc/ds3231.c
Merge patch series "Add remoteproc driver for AM62a SoC"
[J-u-boot.git] / drivers / rtc / ds3231.c
index fde4d860ec188ad9daf2afec98acc1782064bbad..d6267d660d0d6c7247f0ef7f2bccd51e90c00bb7 100644 (file)
  * copied from ds1337.c
  */
 
-#include <common.h>
+#include <config.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
@@ -163,13 +164,13 @@ void rtc_enable_32khz_output(void)
 static
 uchar rtc_read (uchar reg)
 {
-       return (i2c_reg_read (CONFIG_SYS_I2C_RTC_ADDR, reg));
+       return (i2c_reg_read (CFG_SYS_I2C_RTC_ADDR, reg));
 }
 
 
 static void rtc_write (uchar reg, uchar val)
 {
-       i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
+       i2c_reg_write (CFG_SYS_I2C_RTC_ADDR, reg, val);
 }
 #else
 static int ds3231_rtc_get(struct udevice *dev, struct rtc_time *tmp)
@@ -260,10 +261,11 @@ int rtc_enable_32khz_output(int busnum, int chip_addr)
        struct udevice *dev;
 
        ret = i2c_get_chip_for_busnum(busnum, chip_addr, 1, &dev);
-       if (!ret)
+       if (!ret) {
                ret = dm_i2c_reg_write(dev, RTC_STAT_REG_ADDR,
                                       RTC_STAT_BIT_BB32KHZ |
                                       RTC_STAT_BIT_EN32KHZ);
+       }
        return ret;
 }
 #endif
This page took 0.02569 seconds and 4 git commands to generate.