aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-h8300/irq.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-h8300/irq.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-h8300/irq.h')
-rw-r--r--include/asm-h8300/irq.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h
new file mode 100644
index 000000000000..5027181ed067
--- /dev/null
+++ b/include/asm-h8300/irq.h
@@ -0,0 +1,75 @@
1#ifndef _H8300_IRQ_H_
2#define _H8300_IRQ_H_
3
4#include <asm/ptrace.h>
5
6#if defined(__H8300H__)
7#define NR_IRQS 64
8#define EXT_IRQ0 12
9#define EXT_IRQ1 13
10#define EXT_IRQ2 14
11#define EXT_IRQ3 15
12#define EXT_IRQ4 16
13#define EXT_IRQ5 17
14#define EXT_IRQ6 18
15#define EXT_IRQ7 19
16#define EXT_IRQS 5
17
18#include <asm/regs306x.h>
19#define h8300_clear_isr(irq) \
20do { \
21 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ5) \
22 *(volatile unsigned char *)ISR &= ~(1 << (irq - EXT_IRQ0)); \
23} while(0)
24
25#define IER_REGS *(volatile unsigned char *)IER
26#endif
27#if defined(CONFIG_CPU_H8S)
28#define NR_IRQS 128
29#define EXT_IRQ0 16
30#define EXT_IRQ1 17
31#define EXT_IRQ2 18
32#define EXT_IRQ3 19
33#define EXT_IRQ4 20
34#define EXT_IRQ5 21
35#define EXT_IRQ6 22
36#define EXT_IRQ7 23
37#define EXT_IRQ8 24
38#define EXT_IRQ9 25
39#define EXT_IRQ10 26
40#define EXT_IRQ11 27
41#define EXT_IRQ12 28
42#define EXT_IRQ13 29
43#define EXT_IRQ14 30
44#define EXT_IRQ15 31
45#define EXT_IRQS 15
46
47#include <asm/regs267x.h>
48#define h8300_clear_isr(irq) \
49do { \
50 if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) \
51 *(volatile unsigned short *)ISR &= ~(1 << (irq - EXT_IRQ0)); \
52} while(0)
53
54#define IER_REGS *(volatile unsigned short *)IER
55#endif
56
57static __inline__ int irq_canonicalize(int irq)
58{
59 return irq;
60}
61
62extern void enable_irq(unsigned int);
63extern void disable_irq(unsigned int);
64
65/*
66 * Some drivers want these entry points
67 */
68#define enable_irq_nosync(x) enable_irq(x)
69#define disable_irq_nosync(x) disable_irq(x)
70
71struct irqaction;
72struct pt_regs;
73int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
74
75#endif /* _H8300_IRQ_H_ */