From: Werner Pfister Date: Mon, 21 Sep 2009 12:49:55 +0000 (+0200) Subject: rtc/ds1337.c: Allow to set TCR register X-Git-Tag: v2010.09-rc1~28^2~7^2~42^2~62 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b0b181afd2b378dde1a6589f66d74725689ae3f;p=u-boot 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: Werner Pfister Signed-off-by: Detlev Zundel --- diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c index a71ab5daa3..7abf041aab 100644 --- a/drivers/rtc/ds1337.c +++ b/drivers/rtc/ds1337.c @@ -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 }