]> 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>
Wed, 30 Nov 2011 04:11:44 +0000 (15:11 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Nov 2011 04:13:57 +0000 (15:13 +1100)
commit3454c315c65e1704eeccd1e60f0a874c7b170eed
treef7c6af48fc29e039e45cf04157c26667d3b11bdc
parentf030ef86316b560efa4e1d8f52e1edb67abb407d
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