diff options
Diffstat (limited to 'arch/m68k/q40/q40ints.c')
| -rw-r--r-- | arch/m68k/q40/q40ints.c | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index 513f9bb17b9c..14b774b9d308 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c @@ -17,12 +17,15 @@ #include <linux/interrupt.h> #include <linux/irq.h> +#include <asm/machdep.h> #include <asm/ptrace.h> #include <asm/traps.h> #include <asm/q40_master.h> #include <asm/q40ints.h> +#include "q40.h" + /* * Q40 IRQs are defined as follows: * 3,4,5,6,7,10,11,14,15 : ISA dev IRQs @@ -31,7 +34,7 @@ * 33 : frame int (50/200 Hz periodic timer) * 34 : sample int (10/20 KHz periodic timer) * -*/ + */ static void q40_irq_handler(unsigned int, struct pt_regs *fp); static void q40_irq_enable(struct irq_data *data); @@ -48,7 +51,8 @@ static unsigned int q40_irq_startup(struct irq_data *data) switch (irq) { case 1: case 2: case 8: case 9: case 11: case 12: case 13: - printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq); + pr_warn("%s: ISA IRQ %d not implemented by HW\n", __func__, + irq); /* FIXME return -ENXIO; */ } return 0; @@ -102,7 +106,7 @@ void __init q40_init_IRQ(void) * this stuff doesn't really belong here.. */ -int ql_ticks; /* 200Hz ticks since last jiffie */ +int ql_ticks; /* 200Hz ticks since last jiffy */ static int sound_ticks; #define SVOL 45 @@ -126,9 +130,7 @@ void q40_mksound(unsigned int hz, unsigned int ticks) sound_ticks = ticks << 1; } -static irq_handler_t q40_timer_routine; - -static irqreturn_t q40_timer_int (int irq, void * dev) +static irqreturn_t q40_timer_int(int irq, void *dev_id) { ql_ticks = ql_ticks ? 0 : 1; if (sound_ticks) { @@ -138,20 +140,24 @@ static irqreturn_t q40_timer_int (int irq, void * dev) *DAC_RIGHT=sval; } - if (!ql_ticks) - q40_timer_routine(irq, dev); + if (!ql_ticks) { + unsigned long flags; + + local_irq_save(flags); + legacy_timer_tick(1); + timer_heartbeat(); + local_irq_restore(flags); + } return IRQ_HANDLED; } -void q40_sched_init (irq_handler_t timer_routine) +void q40_sched_init (void) { int timer_irq; - q40_timer_routine = timer_routine; timer_irq = Q40_IRQ_FRAME; - if (request_irq(timer_irq, q40_timer_int, 0, - "timer", q40_timer_int)) + if (request_irq(timer_irq, q40_timer_int, 0, "timer", NULL)) panic("Couldn't register timer int"); master_outb(-1, FRAME_CLEAR_REG); @@ -197,8 +203,8 @@ static int ccleirq=60; /* ISA dev IRQs*/ #define DEBUG_Q40INT /*#define IP_USE_DISABLE *//* would be nice, but crashes ???? */ -static int mext_disabled=0; /* ext irq disabled by master chip? */ -static int aliased_irq=0; /* how many times inside handler ?*/ +static int mext_disabled; /* ext irq disabled by master chip? */ +static int aliased_irq; /* how many times inside handler ?*/ /* got interrupt, dispatch to ISA or keyboard/timer IRQs */ @@ -250,7 +256,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) disable_irq(irq); disabled = 1; #else - /*printk("IRQ_INPROGRESS detected for irq %d, disabling - %s disabled\n", + /*pr_warn("IRQ_INPROGRESS detected for irq %d, disabling - %s disabled\n", irq, disabled ? "already" : "not yet"); */ fp->sr = (((fp->sr) & (~0x700))+0x200); disabled = 1; @@ -273,7 +279,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) } #else disabled = 0; - /*printk("reenabling irq %d\n", irq); */ + /*pr_info("reenabling irq %d\n", irq); */ #endif } // used to do 'goto repeat;' here, this delayed bh processing too long @@ -281,7 +287,8 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) } } if (mer && ccleirq > 0 && !aliased_irq) { - printk("ISA interrupt from unknown source? EIRQ_REG = %x\n",mer); + pr_warn("ISA interrupt from unknown source? EIRQ_REG = %x\n", + mer); ccleirq--; } } @@ -301,7 +308,7 @@ void q40_irq_enable(struct irq_data *data) if (irq >= 5 && irq <= 15) { mext_disabled--; if (mext_disabled > 0) - printk("q40_irq_enable : nested disable/enable\n"); + pr_warn("q40_irq_enable : nested disable/enable\n"); if (mext_disabled == 0) master_outb(1, EXT_ENABLE_REG); } @@ -321,6 +328,7 @@ void q40_irq_disable(struct irq_data *data) master_outb(0, EXT_ENABLE_REG); mext_disabled++; if (mext_disabled > 1) - printk("disable_irq nesting count %d\n",mext_disabled); + pr_info("disable_irq nesting count %d\n", + mext_disabled); } } |
