patch-2.1.101 linux/include/asm-ppc/irq.h

Next file: linux/include/asm-ppc/linux_logo.h
Previous file: linux/include/asm-ppc/init.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/include/asm-ppc/irq.h linux/include/asm-ppc/irq.h
@@ -3,6 +3,8 @@
 #ifndef _ASM_IRQ_H
 #define _ASM_IRQ_H
 
+#include <asm/processor.h>		/* for is_prep() */
+
 #ifndef CONFIG_8xx
 /*
  * this is the # irq's for all ppc arch's (pmac/chrp/prep)
@@ -18,13 +20,19 @@
 #define irq_to_openpic(n)	((n)-NUM_8259_INTERRUPTS)
 #define IRQ_8259_CASCADE	NUM_8259_INTERRUPTS
 
+extern void disable_irq(unsigned int);
+extern void enable_irq(unsigned int);
+
+/*
+ * This gets called from serial.c, which is now used on
+ * powermacs as well as prep/chrp boxes.
+ * Prep and chrp both have cascaded 8259 PICs.
+ */
 static __inline__ int irq_cannonicalize(int irq)
 {
-	return irq;
+	return (((is_prep || is_chrp) && irq == 2) ? 9 : irq);
 }
 
-extern void disable_irq(unsigned int);
-extern void enable_irq(unsigned int);
 
 #else /* CONFIG_8xx */
 
@@ -79,6 +87,12 @@
 #define COMM_L_INT	SIU_IRQ6	/* MBX Comm expansion connector pin */
 #define STOP_ABRT_INT	SIU_IRQ7	/* Stop/Abort header pin */
 #endif /* CONFIG_MBX */
+
+/* always the same on MBX -- Cort */
+static __inline__ int irq_cannonicalize(int irq)
+{
+	return irq;
+}
 
 #endif /* CONFIG_8xx */
 

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