diff options
author | Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | 2012-07-20 16:05:36 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-09-02 17:31:00 +0200 |
commit | df930e9b3c6a644d1b0b50dce31fc9f4686925c2 (patch) | |
tree | 78cc9c286d400cff53a058e176b1230dc82ac3f5 /board/davedenx | |
parent | 0880e5bb0c638aec47c1f9349bbb9a0f48179313 (diff) | |
download | u-boot-imx-df930e9b3c6a644d1b0b50dce31fc9f4686925c2.zip u-boot-imx-df930e9b3c6a644d1b0b50dce31fc9f4686925c2.tar.gz u-boot-imx-df930e9b3c6a644d1b0b50dce31fc9f4686925c2.tar.bz2 |
rtc: pcf8563: Make century compatible with Linux
This driver uses the century bit of this RTC in the opposite way Linux does.
From Linux's rtc-pcf8563.c:
/*
* The meaning of MO_C bit varies by the chip type.
* From PCF8563 datasheet: this bit is toggled when the years
* register overflows from 99 to 00
* 0 indicates the century is 20xx
* 1 indicates the century is 19xx
* From RTC8564 datasheet: this bit indicates change of
* century. When the year digit data overflows from 99 to 00,
* this bit is set. By presetting it to 0 while still in the
* 20th century, it will be set in year 2000, ...
* There seems no reliable way to know how the system use this
* bit. So let's do it heuristically, assuming we are live in
* 1970...2069.
*/
As U-Boot's PCF8563 driver does not say it is supposed to support the RTC8564,
make this driver compatible with Linux's by giving the opposite meaning to the
century bit.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/davedenx')
0 files changed, 0 insertions, 0 deletions