]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rtc: armada38x: Align RTC set time procedure with the official errata
authorNadav Haklai <nadavh@marvell.com>
Thu, 6 Aug 2015 15:18:48 +0000 (17:18 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:12 +0000 (13:19 +0200)
commit0c6e718389305cbc4cd9b8e3fd4b4173bd1127e6
tree58da7761f2ef3da35d97f94245cee2963c6e0b3e
parentefbbb4fd6b6fe0d3d2cfb3c5bbcdf00f1995cb60
rtc: armada38x: Align RTC set time procedure with the official errata

According to the Armada38x functional errata FE-3124064, writing to
the RTC TIME register may fail. As a workaround, after writing to RTC
TIME register, issue a dummy write of 0x0 twice to the RTC Status
register.  This is the updated implementation of the Errata that
eliminates the need of the long 100ms delay during the RTC set time
procedure.

[gregory.clement@free-electrons.com]: removed the mutex and use the
spinlock again

Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Reviewed-by: Neta Zur Hershkovits <neta@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-armada38x.c