mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 10:01:32 +00:00
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 <werner.pfister@intercontrol.de> Signed-off-by: Detlev Zundel <dzu@denx.de>
This commit is contained in:
parent
30d7aae7e8
commit
b0078c8792
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,7 @@
|
||||||
#define RTC_YR_REG_ADDR 0x6
|
#define RTC_YR_REG_ADDR 0x6
|
||||||
#define RTC_CTL_REG_ADDR 0x0e
|
#define RTC_CTL_REG_ADDR 0x0e
|
||||||
#define RTC_STAT_REG_ADDR 0x0f
|
#define RTC_STAT_REG_ADDR 0x0f
|
||||||
|
#define RTC_TC_REG_ADDR 0x10
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RTC control register bits
|
* RTC control register bits
|
||||||
|
@ -169,6 +170,9 @@ int rtc_set (struct rtc_time *tmp)
|
||||||
void rtc_reset (void)
|
void rtc_reset (void)
|
||||||
{
|
{
|
||||||
rtc_write (RTC_CTL_REG_ADDR, RTC_DS1337_RESET_VAL);
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue