diff options
author | Geert Uytterhoeven | 2006-10-09 22:23:31 +0200 |
---|---|---|
committer | Linus Torvalds | 2006-10-09 23:54:46 +0200 |
commit | 69961c375288bdab7604e0bb1c8d22999bb8a347 (patch) | |
tree | 869e81d9798a8b41e7e9b35a992fe5794e9f28aa /arch/m68k | |
parent | [PATCH] m68k/HP300: Enable HIL configuration options (diff) | |
download | kernel-qcow2-linux-69961c375288bdab7604e0bb1c8d22999bb8a347.tar.gz kernel-qcow2-linux-69961c375288bdab7604e0bb1c8d22999bb8a347.tar.xz kernel-qcow2-linux-69961c375288bdab7604e0bb1c8d22999bb8a347.zip |
[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')
-rw-r--r-- | arch/m68k/atari/ataints.c | 9 | ||||
-rw-r--r-- | arch/m68k/atari/time.c | 9 | ||||
-rw-r--r-- | arch/m68k/kernel/ints.c | 1 |
3 files changed, 15 insertions, 4 deletions
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index ece13cbf9950..7f812641790c 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -332,6 +332,9 @@ static void atari_shutdown_irq(unsigned int irq) atari_disable_irq(irq); atari_turnoff_irq(irq); m68k_irq_shutdown(irq); + + if (irq == IRQ_AUTO_4) + vectors[VEC_INT4] = falcon_hblhandler; } static struct irq_controller atari_irq_controller = { @@ -356,7 +359,7 @@ static struct irq_controller atari_irq_controller = { void __init atari_init_IRQ(void) { - m68k_setup_user_interrupt(VEC_USER, 192, NULL); + m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL); m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); /* Initialize the MFP(s) */ @@ -403,8 +406,10 @@ void __init atari_init_IRQ(void) * gets overruns) */ - if (!MACH_IS_HADES) + if (!MACH_IS_HADES) { vectors[VEC_INT2] = falcon_hblhandler; + vectors[VEC_INT4] = falcon_hblhandler; + } } if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) { 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 ); diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 849c9488c7f8..84aceca6c05c 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c @@ -132,6 +132,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, { int i; + BUG_ON(IRQ_USER + cnt >= NR_IRQS); m68k_first_user_vec = vec; for (i = 0; i < cnt; i++) irq_controller[IRQ_USER + i] = &user_irq_controller; |