]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Wed, 14 May 2014 00:02:44 +0000 (10:02 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:02:44 +0000 (10:02 +1000)
commit07573001c7a8e7c0df17eec34d8450b72d563257
treed56e39bf630277a8c3a779296726dff0c28b1d5a
parentb61808b223047c0385927135afd217ac75f4eebc
rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq

The rtc user must wait at least 1 sec between each time/calandar update
(see atmel's datasheet chapter "Updating Time/Calendar").

Use the 1Hz interrupt to update the at91_rtc_upd_rdy flag and wait for the
at91_rtc_wait_upd_rdy event if the rtc is not ready.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Reported-by: Bryan Evenson <bevenson@melinkcorp.com>
Tested-by: Bryan Evenson <bevenson@melinkcorp.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-at91rm9200.c