patch-2.1.121 linux/include/asm-arm/arch-ebsa110/irq.h

Next file: linux/include/asm-arm/arch-ebsa110/irqs.h
Previous file: linux/include/asm-arm/arch-arc/uncompress.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.120/linux/include/asm-arm/arch-ebsa110/irq.h linux/include/asm-arm/arch-ebsa110/irq.h
@@ -1,39 +1,35 @@
 /*
  * include/asm-arm/arch-ebsa110/irq.h
  *
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996-1998 Russell King
+ *
+ * Changelog:
+ *   22-08-1998	RMK	Restructured IRQ routines
  */
 
 #define IRQ_MCLR	((volatile unsigned char *)0xf3000000)
 #define IRQ_MSET	((volatile unsigned char *)0xf2c00000)
 #define IRQ_MASK	((volatile unsigned char *)0xf2c00000)
 
-static __inline__ void mask_and_ack_irq(unsigned int irq)
+static void ebsa110_mask_and_ack_irq(unsigned int irq)
 {
-	if (irq < 8)
-		*IRQ_MCLR = 1 << irq;
+	*IRQ_MCLR = 1 << irq;
 }
 
-static __inline__ void mask_irq(unsigned int irq)
+static void ebsa110_mask_irq(unsigned int irq)
 {
-	if (irq < 8)
-		*IRQ_MCLR = 1 << irq;
+	*IRQ_MCLR = 1 << irq;
 }
 
-static __inline__ void unmask_irq(unsigned int irq)
+static void ebsa110_unmask_irq(unsigned int irq)
 {
-	if (irq < 8)
-		*IRQ_MSET = 1 << irq;
+	*IRQ_MSET = 1 << irq;
 }
  
-static __inline__ unsigned long get_enabled_irqs(void)
-{
-	return 0;
-}
-
 static __inline__ void irq_init_irq(void)
 {
 	unsigned long flags;
+	int irq;
 
 	save_flags_cli (flags);
 	*IRQ_MCLR = 0xff;
@@ -43,4 +39,12 @@
 		while (1);
 	*IRQ_MCLR = 0xff;		/* clear all interrupt enables */
 	restore_flags (flags);
+
+	for (irq = 0; irq < NR_IRQS; irq++) {
+		irq_desc[irq].valid	= 1;
+		irq_desc[irq].probe_ok	= 1;
+		irq_desc[irq].mask_ack	= ebsa110_mask_and_ack_irq;
+		irq_desc[irq].mask	= ebsa110_mask_irq;
+		irq_desc[irq].unmask	= ebsa110_unmask_irq;
+	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov