From 69961c375288bdab7604e0bb1c8d22999bb8a347 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 9 Oct 2006 22:23:31 +0200 Subject: [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 Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- arch/m68k/atari/time.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'arch/m68k/atari/time.c') 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 #include #include +#include #include @@ -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 ); -- cgit