drivers/rtc/rtc-r9701.c: reset registers if invalid values are detected
authorAndreas Dumberger <andreas.dumberger@tqs.de>
Thu, 12 Apr 2012 19:49:12 +0000 (12:49 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 14:32:03 +0000 (19:32 +0530)
commit8c951f381867af7a57d1530727edbea198c893b9
tree44decc193e0dde38b82d85df486510115808836d
parent327c2b00a883cd2c6aa36c31e1af10e82d7d144b
drivers/rtc/rtc-r9701.c: reset registers if invalid values are detected

hwclock refuses to set date/time if RTC registers contain invalid
values.  Check the date/time register values at probe time and
initialize them to make hwclock happy.

Signed-off-by: Andreas Dumberger <andreas.dumberger@tqs.de>
Signed-off-by: Anatolij Gustschin <agust@denx.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-r9701.c