summaryrefslogtreecommitdiff
path: root/arch/m68k/atari/time.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2006-10-09 22:23:31 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-09 14:54:46 -0700
commit69961c375288bdab7604e0bb1c8d22999bb8a347 (patch)
tree869e81d9798a8b41e7e9b35a992fe5794e9f28aa /arch/m68k/atari/time.c
parentda96d0b58adddf3bdeaa9644ac74f0dcc9039407 (diff)
[PATCH] m68k/Atari: Interrupt updates
Misc Atari fixes: - initialize correct number of atari irqs - silence vbl interrupt until it's used by atafb - use mdelay() to read clock if necessary Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68k/atari/time.c')
-rw-r--r--arch/m68k/atari/time.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index c44df4a4a331..e0d3c8bfb408 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
+#include <linux/delay.h>
#include <asm/atariints.h>
@@ -212,8 +213,12 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
* additionally the RTC_SET bit is set to prevent an update cycle.
*/
- while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP )
- schedule_timeout_interruptible(HWCLK_POLL_INTERVAL);
+ while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) {
+ if (in_atomic() || irqs_disabled())
+ mdelay(1);
+ else
+ schedule_timeout_interruptible(HWCLK_POLL_INTERVAL);
+ }
local_irq_save(flags);
RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET );