14 #include <linux/types.h>
15 #include <linux/kernel.h>
16 #include <linux/errno.h>
20 #include <asm/ptrace.h>
21 #include <asm/traps.h>
36 static void q40_irq_handler(
unsigned int,
struct pt_regs *
fp);
43 static unsigned int q40_irq_startup(
struct irq_data *
data)
45 unsigned int irq = data->
irq;
49 case 1:
case 2:
case 8:
case 9:
50 case 11:
case 12:
case 13:
51 printk(
"%s: ISA IRQ %d not implemented by HW\n", __func__, irq);
61 static struct irq_chip q40_irq_chip = {
63 .irq_startup = q40_irq_startup,
64 .irq_shutdown = q40_irq_shutdown,
65 .irq_enable = q40_irq_enable,
66 .irq_disable = q40_irq_disable,
106 static int sound_ticks;
124 if (sound_ticks == 0)
126 sound_ticks = ticks << 1;
135 unsigned char sval=(sound_ticks & 1) ? 128-
SVOL : 128+
SVOL;
142 q40_timer_routine(irq, dev);
150 q40_timer_routine = timer_routine;
154 "timer", q40_timer_int))
155 panic(
"Couldn't register timer int");
188 static int ccleirq=60;
193 #define IRQ_INPROGRESS 1
200 static int mext_disabled=0;
201 static int aliased_irq=0;
205 static void q40_irq_handler(
unsigned int irq,
struct pt_regs *
fp)
212 #ifdef CONFIG_BLK_DEV_FD
231 for (i = 0; eirqs[
i].
mask; i++) {
232 if (mer & eirqs[i].
mask) {
240 if (irq > 4 && irq <= 15 && mext_disabled) {
247 #ifdef IP_USE_DISABLE
255 fp->
sr = (((fp->
sr) & (~0x700))+0x200);
269 #ifdef IP_USE_DISABLE
283 if (mer && ccleirq > 0 && !aliased_irq) {
284 printk(
"ISA interrupt from unknown source? EIRQ_REG = %x\n",mer);
299 unsigned int irq = data->
irq;
301 if (irq >= 5 && irq <= 15) {
303 if (mext_disabled > 0)
304 printk(
"q40_irq_enable : nested disable/enable\n");
305 if (mext_disabled == 0)
311 void q40_irq_disable(
struct irq_data *data)
313 unsigned int irq = data->
irq;
320 if (irq >= 5 && irq <= 15) {
323 if (mext_disabled > 1)
324 printk(
"disable_irq nesting count %d\n",mext_disabled);