From: Boris BREZILLON Date: Fri, 6 Jun 2014 21:36:09 +0000 (-0700) Subject: rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq X-Git-Tag: omap-for-v3.16/fixes-against-rc1~91^2~4^2~137 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fe121e1f5aa3bf31b418a9790db6c400e922291;p=pandora-kernel.git 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. This patch fixes a deadlock in an uninterruptible wait when the RTC is updated more than once every second. AFAICT the bug is here from the beginning, but I think we should at least backport this fix to 3.10 and the following longterm and stable releases. Signed-off-by: Boris BREZILLON Reported-by: Bryan Evenson Tested-by: Bryan Evenson Cc: Andrew Victor Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard Cc: Alessandro Zummo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed