patch-2.4.0-test6 linux/include/asm-sh/irq.h
Next file: linux/include/asm-sh/keyboard.h
Previous file: linux/include/asm-sh/io_unknown.h
Back to the patch index
Back to the overall index
- Lines: 117
- Date:
Wed Aug 9 13:59:04 2000
- Orig file:
v2.4.0-test5/linux/include/asm-sh/irq.h
- Orig date:
Fri Jun 23 21:55:11 2000
diff -u --recursive --new-file v2.4.0-test5/linux/include/asm-sh/irq.h linux/include/asm-sh/irq.h
@@ -11,6 +11,7 @@
*/
#include <linux/config.h>
+#include <asm/machvec.h>
#if defined(__sh3__)
#define INTC_IPRA 0xfffffee2UL
@@ -31,6 +32,43 @@
#define RTC_IPR_POS 0
#define RTC_PRIORITY TIMER_PRIORITY
+#define SCI_ERI_IRQ 23
+#define SCI_RXI_IRQ 24
+#define SCI_TXI_IRQ 25
+#define SCI_IPR_ADDR INTC_IPRB
+#define SCI_IPR_POS 1
+#define SCI_PRIORITY 3
+
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
+#define SCIF_ERI_IRQ 56
+#define SCIF_RXI_IRQ 57
+#define SCIF_TXI_IRQ 59
+#define SCIF_IPR_ADDR INTC_IPRE
+#define SCIF_IPR_POS 1
+#define SCIF_PRIORITY 3
+
+#define IRDA_ERI_IRQ 52
+#define IRDA_RXI_IRQ 53
+#define IRDA_TXI_IRQ 55
+#define IRDA_IPR_ADDR INTC_IPRE
+#define IRDA_IPR_POS 2
+#define IRDA_PRIORITY 3
+#elif defined(CONFIG_CPU_SUBTYPE_SH7750)
+#define SCIF_ERI_IRQ 40
+#define SCIF_RXI_IRQ 41
+#define SCIF_TXI_IRQ 43
+#define SCIF_IPR_ADDR INTC_IPRC
+#define SCIF_IPR_POS 1
+#define SCIF_PRIORITY 3
+#endif
+
+#ifdef CONFIG_SH_GENERIC
+/* In a generic kernel, NR_IRQS is an upper bound, and we should use
+ * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value.
+ */
+#define NR_IRQS 80
+#define ACTUAL_NR_IRQS (sh_mv.mv_nr_irqs)
+#else
#if defined(__SH4__)
/*
* 48 = 32+16
@@ -40,6 +78,8 @@
*
*/
#define NR_IRQS 48
+#elif defined(CONFIG_CPU_SUBTYPE_SH7707)
+#define NR_IRQS 64
#elif defined(CONFIG_CPU_SUBTYPE_SH7708)
#define NR_IRQS 32
#elif defined(CONFIG_CPU_SUBTYPE_SH7709)
@@ -49,6 +89,8 @@
#define NR_IRQS 61
#endif
#endif
+#define ACTUAL_NR_IRQS NR_IRQS
+#endif
extern void disable_irq(unsigned int);
extern void disable_irq_nosync(unsigned int);
@@ -57,12 +99,11 @@
/*
* Function for "on chip support modules".
*/
-extern void set_ipr_data(unsigned int irq, unsigned int addr,
+extern void make_ipr_irq(unsigned int irq, unsigned int addr,
int pos, int priority);
-extern void make_ipr_irq(unsigned int irq);
extern void make_imask_irq(unsigned int irq);
-#if defined(CONFIG_CPU_SUBTYPE_SH7709)
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
#define INTC_IRR0 0xa4000004UL
#define INTC_IRR1 0xa4000006UL
#define INTC_IRR2 0xa4000008UL
@@ -75,6 +116,9 @@
#define INTC_IPRC 0xa4000016UL
#define INTC_IPRD 0xa4000018UL
#define INTC_IPRE 0xa400001aUL
+#if defined(CONFIG_CPU_SUBTYPE_SH7707)
+#define INTC_IPRF 0xa400001cUL
+#endif
#define IRQ0_IRQ 32
#define IRQ1_IRQ 33
@@ -103,6 +147,21 @@
#define IRQ3_PRIORITY 1
#define IRQ4_PRIORITY 1
#define IRQ5_PRIORITY 1
+#endif
+
+extern int hd64461_irq_demux(int irq);
+
+#ifdef CONFIG_SH_GENERIC
+extern __inline__ int irq_demux(int irq) {
+ if (sh_mv.mv_irq_demux) {
+ irq = sh_mv.mv_irq_demux(irq);
+ }
+ return irq;
+}
+#elif defined(CONFIG_HD64461)
+#define irq_demux(irq) hd64461_irq_demux(irq)
+#else
+#define irq_demux(irq) irq
#endif
#endif /* __ASM_SH_IRQ_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)