Commit 6b0b181a authored by Werner Pfister's avatar Werner Pfister Committed by Tom Rix

rtc/ds1337.c: Allow to set TCR register

This is needed to correctly start the charging of an attached capacitor
or battery.
Signed-off-by: default avatarWerner Pfister <werner.pfister@intercontrol.de>
Signed-off-by: default avatarDetlev Zundel <dzu@denx.de>
parent 3998c62d
......@@ -56,6 +56,7 @@
#define RTC_YR_REG_ADDR 0x6
#define RTC_CTL_REG_ADDR 0x0e
#define RTC_STAT_REG_ADDR 0x0f
#define RTC_TC_REG_ADDR 0x10
/*
* RTC control register bits
......@@ -169,6 +170,9 @@ int rtc_set (struct rtc_time *tmp)
void rtc_reset (void)
{
rtc_write (RTC_CTL_REG_ADDR, RTC_DS1337_RESET_VAL);
#ifdef CONFIG_SYS_DS1339_TCR_VAL
rtc_write (RTC_TC_REG_ADDR, CONFIG_SYS_DS1339_TCR_VAL);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment