diff options
Diffstat (limited to 'include/asm-m68k/irq.h')
-rw-r--r-- | include/asm-m68k/irq.h | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 7fa8733bb4cc..f4ae7d8feac6 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -1,25 +1,30 @@ | |||
1 | #ifndef _M68K_IRQ_H_ | 1 | #ifndef _M68K_IRQ_H_ |
2 | #define _M68K_IRQ_H_ | 2 | #define _M68K_IRQ_H_ |
3 | 3 | ||
4 | #include <linux/linkage.h> | ||
4 | #include <linux/hardirq.h> | 5 | #include <linux/hardirq.h> |
5 | #include <linux/spinlock_types.h> | 6 | #include <linux/spinlock_types.h> |
6 | 7 | ||
7 | /* | 8 | /* |
8 | * # of m68k auto vector interrupts | ||
9 | */ | ||
10 | |||
11 | #define SYS_IRQS 8 | ||
12 | |||
13 | /* | ||
14 | * This should be the same as the max(NUM_X_SOURCES) for all the | 9 | * This should be the same as the max(NUM_X_SOURCES) for all the |
15 | * different m68k hosts compiled into the kernel. | 10 | * different m68k hosts compiled into the kernel. |
16 | * Currently the Atari has 72 and the Amiga 24, but if both are | 11 | * Currently the Atari has 72 and the Amiga 24, but if both are |
17 | * supported in the kernel it is better to make room for 72. | 12 | * supported in the kernel it is better to make room for 72. |
18 | */ | 13 | */ |
19 | #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) | 14 | #if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X) |
20 | #define NR_IRQS (72+SYS_IRQS) | 15 | #define NR_IRQS 200 |
16 | #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) | ||
17 | #define NR_IRQS 72 | ||
18 | #elif defined(CONFIG_Q40) | ||
19 | #define NR_IRQS 43 | ||
20 | #elif defined(CONFIG_AMIGA) | ||
21 | #define NR_IRQS 32 | ||
22 | #elif defined(CONFIG_APOLLO) | ||
23 | #define NR_IRQS 24 | ||
24 | #elif defined(CONFIG_HP300) | ||
25 | #define NR_IRQS 8 | ||
21 | #else | 26 | #else |
22 | #define NR_IRQS (24+SYS_IRQS) | 27 | #error unknown nr of irqs |
23 | #endif | 28 | #endif |
24 | 29 | ||
25 | /* | 30 | /* |
@@ -53,39 +58,13 @@ | |||
53 | 58 | ||
54 | #define IRQ_USER 8 | 59 | #define IRQ_USER 8 |
55 | 60 | ||
56 | static __inline__ int irq_canonicalize(int irq) | 61 | extern unsigned int irq_canonicalize(unsigned int irq); |
57 | { | 62 | extern void enable_irq(unsigned int); |
58 | return irq; | 63 | extern void disable_irq(unsigned int); |
59 | } | ||
60 | |||
61 | /* | ||
62 | * Machine specific interrupt sources. | ||
63 | * | ||
64 | * Adding an interrupt service routine for a source with this bit | ||
65 | * set indicates a special machine specific interrupt source. | ||
66 | * The machine specific files define these sources. | ||
67 | * | ||
68 | * The IRQ_MACHSPEC bit is now gone - the only thing it did was to | ||
69 | * introduce unnecessary overhead. | ||
70 | * | ||
71 | * All interrupt handling is actually machine specific so it is better | ||
72 | * to use function pointers, as used by the Sparc port, and select the | ||
73 | * interrupt handling functions when initializing the kernel. This way | ||
74 | * we save some unnecessary overhead at run-time. | ||
75 | * 01/11/97 - Jes | ||
76 | */ | ||
77 | |||
78 | extern void (*enable_irq)(unsigned int); | ||
79 | extern void (*disable_irq)(unsigned int); | ||
80 | #define disable_irq_nosync disable_irq | 64 | #define disable_irq_nosync disable_irq |
81 | 65 | ||
82 | struct pt_regs; | 66 | struct pt_regs; |
83 | 67 | ||
84 | extern int cpu_request_irq(unsigned int, | ||
85 | int (*)(int, void *, struct pt_regs *), | ||
86 | unsigned long, const char *, void *); | ||
87 | extern void cpu_free_irq(unsigned int, void *); | ||
88 | |||
89 | /* | 68 | /* |
90 | * various flags for request_irq() - the Amiga now uses the standard | 69 | * various flags for request_irq() - the Amiga now uses the standard |
91 | * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ | 70 | * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ |
@@ -133,12 +112,16 @@ struct irq_controller { | |||
133 | extern int m68k_irq_startup(unsigned int); | 112 | extern int m68k_irq_startup(unsigned int); |
134 | extern void m68k_irq_shutdown(unsigned int); | 113 | extern void m68k_irq_shutdown(unsigned int); |
135 | 114 | ||
136 | /* count of spurious interrupts */ | ||
137 | extern volatile unsigned int num_spurious; | ||
138 | |||
139 | /* | 115 | /* |
140 | * This function returns a new irq_node_t | 116 | * This function returns a new irq_node_t |
141 | */ | 117 | */ |
142 | extern irq_node_t *new_irq_node(void); | 118 | extern irq_node_t *new_irq_node(void); |
143 | 119 | ||
120 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); | ||
121 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | ||
122 | void (*handler)(unsigned int, struct pt_regs *)); | ||
123 | extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int); | ||
124 | |||
125 | asmlinkage void m68k_handle_int(unsigned int, struct pt_regs *); | ||
126 | |||
144 | #endif /* _M68K_IRQ_H_ */ | 127 | #endif /* _M68K_IRQ_H_ */ |