drivers/rtc/rtc-omap.c: unlock and lock rtc registers before and after register writes
drivers/rtc/rtc-omap.c: unlock and lock rtc registers before and after register writes

RTC module contains a kicker mechanism to prevent any spurious writes from
changing the register values.  This mechanism requires two MMR writes to
the KICK0 and KICK1 registers with exact data values before the kicker
lock mechanism is released.

Currently the driver release the lock in the probe and leaves it enabled
until the rtc driver removal.  This eliminates the idea of preventing
spurious writes when RTC driver is loaded.  So implement rtc lock and
unlock functions before and after register writes.

This is as advised by Paul to implement lock and unlock functions in the
driver and not to unlock and leave it in probe.  The same discussion can
be seen here:
http://www.mail-archive.com/linux-omap%40vger.kernel.org/msg111588.html

Signed-off-by: Lokesh Vutla <c1574519d727edaf2e16b260e452051ef77bf018@ti.com>
Acked-by: Alexandre Belloni <a7228e626ecf0022ac91fc1cd8db88e71d0e5e0e@free-electrons.com>
Cc: Alessandro Zummo <f0b9bd96bf07bfecc189c62159960134588fafe5@towertech.it>
Cc: Paul Walmsley <a027184a55211cd23e3f3094f1fdc728df5e0500@pwsan.com>
Cc: Tero Kristo <060a12f1fbc7e2e5d830b72f402ff04fdae8d312@ti.com>
Cc: Sekhar Nori <946cfb81282bb55c59f600e7ee3d3b2c6973f7a3@ti.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs