]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/rtc/rtc-mxc.c: fix setting time for MX1 SoC
authorYauhen Kharuzhy <jekhor@gmail.com>
Fri, 2 Dec 2011 03:12:50 +0000 (14:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Dec 2011 04:05:39 +0000 (15:05 +1100)
commitaa241da94e184047541103d1962cccb6cbd37add
treedfb9832eed18b02d53b2cef7dc57ccde9fdb019e
parentc6e81baca48995e59db2b4178e1053cd9e674ad3
drivers/rtc/rtc-mxc.c: fix setting time for MX1 SoC

There is no way to track year in the i.MX1 RTC: Days Counter register is
9-bit wide only.  Attempt to save date after 1970-01-01 plus 512 days
causes endless loop in mxc_rtc_set_mmss().  Fix this by resetting year to
1970.

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-mxc.c