diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/Kconfig | 2 | ||||
-rw-r--r-- | drivers/rtc/emul_rtc.c | 2 | ||||
-rw-r--r-- | drivers/rtc/max313xx.c | 7 |
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 9c2d1398247..6467f20422b 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -294,7 +294,7 @@ config RTC_DAVINCI config RTC_ZYNQMP bool "Enable ZynqMP RTC driver" - depends on ARCH_ZYNQMP + depends on DM_RTC && (ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2) help Say "yes" here to support the on chip real time clock present on Xilinx ZynqMP SoC. diff --git a/drivers/rtc/emul_rtc.c b/drivers/rtc/emul_rtc.c index 97a8d9bb7df..6817daad18f 100644 --- a/drivers/rtc/emul_rtc.c +++ b/drivers/rtc/emul_rtc.c @@ -58,7 +58,7 @@ static int emul_rtc_set(struct udevice *dev, const struct rtc_time *time) return 0; } -int emul_rtc_probe(struct udevice *dev) +static int emul_rtc_probe(struct udevice *dev) { struct emul_rtc *priv = dev_get_priv(dev); const char *epoch_str; diff --git a/drivers/rtc/max313xx.c b/drivers/rtc/max313xx.c index 60400235dd0..2cb3f245041 100644 --- a/drivers/rtc/max313xx.c +++ b/drivers/rtc/max313xx.c @@ -285,7 +285,7 @@ static int max313xx_set_time(struct udevice *dev, const struct rtc_time *t) regs[5] = bin2bcd(t->tm_mon); regs[6] = bin2bcd((t->tm_year - 2000) % 100); - if ((t->tm_year - 2000) >= 200) + if (t->tm_year >= 2100) regs[5] |= FIELD_PREP(MAX313XX_MONTH_CENTURY, 1); ret = dm_i2c_write(dev, rtc->chip->sec_reg, regs, 7); @@ -308,6 +308,11 @@ static int max313xx_set_time(struct udevice *dev, const struct rtc_time *t) return ret; break; + case ID_MAX31343: + /* Time is not updated for 1 second after writing */ + /* Sleep here so the date command shows the new time */ + mdelay(1000); + break; default: break; } |