]> 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>
Fri, 16 Dec 2011 04:50:24 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 20 Dec 2011 07:43:54 +0000 (18:43 +1100)
commit1f3f1e0ff7f4809537d1d5755a1a562c3fcc5d03
treee8319cf3dc5aa3f4eb6932173911f0dd662a3607
parent322cad3cfc7c376376697dcbf204928c12af7f8a
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