Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
69961c37 da96d0b5

+15 -4
+7 -2
arch/m68k/atari/ataints.c
··· 332 332 atari_disable_irq(irq); 333 333 atari_turnoff_irq(irq); 334 334 m68k_irq_shutdown(irq); 335 + 336 + if (irq == IRQ_AUTO_4) 337 + vectors[VEC_INT4] = falcon_hblhandler; 335 338 } 336 339 337 340 static struct irq_controller atari_irq_controller = { ··· 359 356 360 357 void __init atari_init_IRQ(void) 361 358 { 362 - m68k_setup_user_interrupt(VEC_USER, 192, NULL); 359 + m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL); 363 360 m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); 364 361 365 362 /* Initialize the MFP(s) */ ··· 406 403 * gets overruns) 407 404 */ 408 405 409 - if (!MACH_IS_HADES) 406 + if (!MACH_IS_HADES) { 410 407 vectors[VEC_INT2] = falcon_hblhandler; 408 + vectors[VEC_INT4] = falcon_hblhandler; 409 + } 411 410 } 412 411 413 412 if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) {
+7 -2
arch/m68k/atari/time.c
··· 16 16 #include <linux/init.h> 17 17 #include <linux/rtc.h> 18 18 #include <linux/bcd.h> 19 + #include <linux/delay.h> 19 20 20 21 #include <asm/atariints.h> 21 22 ··· 213 212 * additionally the RTC_SET bit is set to prevent an update cycle. 214 213 */ 215 214 216 - while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) 217 - schedule_timeout_interruptible(HWCLK_POLL_INTERVAL); 215 + while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) { 216 + if (in_atomic() || irqs_disabled()) 217 + mdelay(1); 218 + else 219 + schedule_timeout_interruptible(HWCLK_POLL_INTERVAL); 220 + } 218 221 219 222 local_irq_save(flags); 220 223 RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET );
+1
arch/m68k/kernel/ints.c
··· 132 132 { 133 133 int i; 134 134 135 + BUG_ON(IRQ_USER + cnt >= NR_IRQS); 135 136 m68k_first_user_vec = vec; 136 137 for (i = 0; i < cnt; i++) 137 138 irq_controller[IRQ_USER + i] = &user_irq_controller;