]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drivers/rtc/rtc-mxc.c: fix setting time for MX1 SoC
authorYauhen Kharuzhy <jekhor@gmail.com>
Thu, 8 Dec 2011 04:42:28 +0000 (15:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:23 +0000 (17:43 +1100)
commitd3a4ebf2999a81be5896d4408685d3c50ce47057
treed074f81adfd04d81a8adaadc72789386a5297118
parentcc2c3ce2a00796dcc21b00ecae097e1831a0a7a4
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