*
*/
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/interrupt.h>
+#include <linux/hardirq.h>
#include <asm/rtc.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/irq.h>
-#include <asm/hardirq.h>
#include <asm/traps.h>
#include <asm/q40_master.h>
#include <asm/q40ints.h>
-/*
- * Q40 IRQs are defined as follows:
+/*
+ * Q40 IRQs are defined as follows:
* 3,4,5,6,7,10,11,14,15 : ISA dev IRQs
* 16-31: reserved
* 32 : keyboard int
* 33 : frame int (50/200 Hz periodic timer)
* 34 : sample int (10/20 KHz periodic timer)
- *
+ *
*/
extern int ints_inited;
case 12: case 13:
printk("%s: ISA IRQ %d from %s not implemented by HW\n", __FUNCTION__, irq, devname);
return -ENXIO;
- case 11:
+ case 11:
printk("warning IRQ 10 and 11 not distinguishable\n");
irq=10;
default:
if (irq<Q40_IRQ_SAMPLE)
{
- if (irq_tab[irq].dev_id != NULL)
+ if (irq_tab[irq].dev_id != NULL)
{
printk("%s: IRQ %d from %s is not replaceable\n",
__FUNCTION__, irq, irq_tab[irq].devname);
default:
;
}
-
+
if (irq<Q40_IRQ_SAMPLE)
{
if (irq_tab[irq].dev_id != dev_id)
printk("%s: Removing probably wrong IRQ %d from %s\n",
__FUNCTION__, irq, irq_tab[irq].devname);
-
+
irq_tab[irq].handler = q40_defhand;
irq_tab[irq].flags = 0;
irq_tab[irq].dev_id = NULL;
return IRQ_HANDLED;
}
-/*
+/*
* this stuff doesn't really belong here..
*/
}
-/*
- * tables to translate bits into IRQ numbers
+/*
+ * tables to translate bits into IRQ numbers
* it is a good idea to order the entries by priority
- *
+ *
*/
struct IRQ_TABLE{ unsigned mask; int irq ;};
mir=master_inb(IIRQ_REG);
if (mir&Q40_IRQ_FRAME_MASK) {
irq_tab[Q40_IRQ_FRAME].count++;
- irq_tab[Q40_IRQ_FRAME].handler(Q40_IRQ_FRAME,irq_tab[Q40_IRQ_FRAME].dev_id,fp);
+ irq_tab[Q40_IRQ_FRAME].handler(Q40_IRQ_FRAME,irq_tab[Q40_IRQ_FRAME].dev_id,fp);
master_outb(-1,FRAME_CLEAR_REG);
}
if ((mir&Q40_IRQ_SER_MASK) || (mir&Q40_IRQ_EXT_MASK)) {
#endif
goto iirq;
}
- irq_tab[irq].count++;
+ irq_tab[irq].count++;
irq_tab[irq].state |= IRQ_INPROGRESS;
irq_tab[irq].handler(irq,irq_tab[irq].dev_id,fp);
irq_tab[irq].state &= ~IRQ_INPROGRESS;
-
+
/* naively enable everything, if that fails than */
/* this function will be reentered immediately thus */
/* getting another chance to disable the IRQ */
-
+
if ( disabled ) {
#ifdef IP_USE_DISABLE
if (irq>4){
return IRQ_HANDLED;
}
}
- if (mer && ccleirq>0 && !aliased_irq)
+ if (mer && ccleirq>0 && !aliased_irq)
printk("ISA interrupt from unknown source? EIRQ_REG = %x\n",mer),ccleirq--;
- }
+ }
iirq:
mir=master_inb(IIRQ_REG);
/* should test whether keyboard irq is really enabled, doing it in defhand */
for (i = 0; i <= Q40_IRQ_MAX; i++) {
if (irq_tab[i].count)
seq_printf(p, "%sIRQ %02d: %8d %s%s\n",
- (i<=15) ? "ISA-" : " " ,
+ (i<=15) ? "ISA-" : " " ,
i, irq_tab[i].count,
irq_tab[i].devname[0] ? irq_tab[i].devname : "?",
- irq_tab[i].handler == q40_defhand ?
+ irq_tab[i].handler == q40_defhand ?
" (now unassigned)" : "");
}
return 0;
{
mext_disabled--;
if (mext_disabled>0)
- printk("q40_enable_irq : nested disable/enable\n");
+ printk("q40_enable_irq : nested disable/enable\n");
if (mext_disabled==0)
master_outb(1,EXT_ENABLE_REG);
}