blob: a08fa9b958dab2cc122a5ca5e755454c5bd34495 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _M68K_IRQ_H_
2#define _M68K_IRQ_H_
3
4#include <linux/config.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <asm/ptrace.h>
6
7#ifdef CONFIG_COLDFIRE
8/*
9 * On the ColdFire we keep track of all vectors. That way drivers
10 * can register whatever vector number they wish, and we can deal
11 * with it.
12 */
13#define SYS_IRQS 256
14#define NR_IRQS SYS_IRQS
15
16#else
17
18/*
19 * # of m68k interrupts
20 */
21#define SYS_IRQS 8
22#define NR_IRQS (24+SYS_IRQS)
23
24#endif /* CONFIG_COLDFIRE */
25
26/*
27 * Interrupt source definitions
28 * General interrupt sources are the level 1-7.
29 * Adding an interrupt service routine for one of these sources
30 * results in the addition of that routine to a chain of routines.
31 * Each one is called in succession. Each individual interrupt
32 * service routine should determine if the device associated with
33 * that routine requires service.
34 */
35
36#define IRQ1 (1) /* level 1 interrupt */
37#define IRQ2 (2) /* level 2 interrupt */
38#define IRQ3 (3) /* level 3 interrupt */
39#define IRQ4 (4) /* level 4 interrupt */
40#define IRQ5 (5) /* level 5 interrupt */
41#define IRQ6 (6) /* level 6 interrupt */
42#define IRQ7 (7) /* level 7 interrupt (non-maskable) */
43
44/*
45 * Machine specific interrupt sources.
46 *
47 * Adding an interrupt service routine for a source with this bit
48 * set indicates a special machine specific interrupt source.
49 * The machine specific files define these sources.
50 *
51 * The IRQ_MACHSPEC bit is now gone - the only thing it did was to
52 * introduce unnecessary overhead.
53 *
54 * All interrupt handling is actually machine specific so it is better
55 * to use function pointers, as used by the Sparc port, and select the
56 * interrupt handling functions when initializing the kernel. This way
57 * we save some unnecessary overhead at run-time.
58 * 01/11/97 - Jes
59 */
60
61extern void (*mach_enable_irq)(unsigned int);
62extern void (*mach_disable_irq)(unsigned int);
63
64/*
65 * various flags for request_irq() - the Amiga now uses the standard
66 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ
67 * are your friends.
68 */
69#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
70#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
71#define IRQ_FLG_FAST (0x0004)
72#define IRQ_FLG_SLOW (0x0008)
73#define IRQ_FLG_STD (0x8000) /* internally used */
74
75#ifdef CONFIG_M68360
76
77#define CPM_INTERRUPT IRQ4
78
79/* see MC68360 User's Manual, p. 7-377 */
80#define CPM_VECTOR_BASE 0x04 /* 3 MSbits of CPM vector */
81
82#endif /* CONFIG_M68360 */
83
84/*
Linus Torvalds1da177e2005-04-16 15:20:36 -070085 * Some drivers want these entry points
86 */
87#define enable_irq(x) (mach_enable_irq ? (*mach_enable_irq)(x) : 0)
88#define disable_irq(x) (mach_disable_irq ? (*mach_disable_irq)(x) : 0)
89
90#define enable_irq_nosync(x) enable_irq(x)
91#define disable_irq_nosync(x) disable_irq(x)
92
93struct irqaction;
94struct pt_regs;
95int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
96
97#endif /* _M68K_IRQ_H_ */