]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/rtc/rtc-mxc.c: fix setting time for MX1 SoC
authorYauhen Kharuzhy <jekhor@gmail.com>
Tue, 10 Jan 2012 23:10:32 +0000 (15:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Jan 2012 00:30:52 +0000 (16:30 -0800)
commit1efd53c808aefefab9e82d99abcb0b616cc1d3b0
tree7ed79d428bec700c2288c83cf3d685f87aa7019a
parent62db0b1a101637fed1e137f483bc0431e476e5f5
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.

[akpm@linux-foundation.org: use conventional comment layout]
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-mxc.c