Commit 69961c375288bdab7604e0bb1c8d22999bb8a347
Committed by
Linus Torvalds
1 parent
da96d0b58a
[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>
Showing 3 changed files with 15 additions and 4 deletions Side-by-side Diff
arch/m68k/atari/ataints.c
... | ... | @@ -332,6 +332,9 @@ |
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 = { |
... | ... | @@ -356,7 +359,7 @@ |
356 | 359 | |
357 | 360 | void __init atari_init_IRQ(void) |
358 | 361 | { |
359 | - m68k_setup_user_interrupt(VEC_USER, 192, NULL); | |
362 | + m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL); | |
360 | 363 | m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); |
361 | 364 | |
362 | 365 | /* Initialize the MFP(s) */ |
363 | 366 | |
... | ... | @@ -403,8 +406,10 @@ |
403 | 406 | * gets overruns) |
404 | 407 | */ |
405 | 408 | |
406 | - if (!MACH_IS_HADES) | |
409 | + if (!MACH_IS_HADES) { | |
407 | 410 | vectors[VEC_INT2] = falcon_hblhandler; |
411 | + vectors[VEC_INT4] = falcon_hblhandler; | |
412 | + } | |
408 | 413 | } |
409 | 414 | |
410 | 415 | if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) { |
arch/m68k/atari/time.c
... | ... | @@ -16,6 +16,7 @@ |
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 | |
... | ... | @@ -212,8 +213,12 @@ |
212 | 213 | * additionally the RTC_SET bit is set to prevent an update cycle. |
213 | 214 | */ |
214 | 215 | |
215 | - while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) | |
216 | - schedule_timeout_interruptible(HWCLK_POLL_INTERVAL); | |
216 | + while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) { | |
217 | + if (in_atomic() || irqs_disabled()) | |
218 | + mdelay(1); | |
219 | + else | |
220 | + schedule_timeout_interruptible(HWCLK_POLL_INTERVAL); | |
221 | + } | |
217 | 222 | |
218 | 223 | local_irq_save(flags); |
219 | 224 | RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET ); |