diff options
author | Greg Ungerer <gerg@snapgear.com> | 2007-07-19 04:49:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:50 -0400 |
commit | 2502b667ea835ee16685c74b2a0d89ba8afe117a (patch) | |
tree | 31d492fb934df6d83819b679f3aa8d7f6952396d /include | |
parent | f8af0bb890d6cdcb09ec042c128e217a7c500355 (diff) |
m68knommu: generic irq handling
Change the m68knommu irq handling to use the generic irq framework.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-m68knommu/irq.h | 75 | ||||
-rw-r--r-- | include/asm-m68knommu/irqnode.h | 36 | ||||
-rw-r--r-- | include/asm-m68knommu/m68360.h | 8 | ||||
-rw-r--r-- | include/asm-m68knommu/traps.h | 4 |
4 files changed, 17 insertions, 106 deletions
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index 7b8f874f8429..9373c31ac87d 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h | |||
@@ -1,7 +1,5 @@ | |||
1 | #ifndef _M68K_IRQ_H_ | 1 | #ifndef _M68KNOMMU_IRQ_H_ |
2 | #define _M68K_IRQ_H_ | 2 | #define _M68KNOMMU_IRQ_H_ |
3 | |||
4 | #include <asm/ptrace.h> | ||
5 | 3 | ||
6 | #ifdef CONFIG_COLDFIRE | 4 | #ifdef CONFIG_COLDFIRE |
7 | /* | 5 | /* |
@@ -17,75 +15,12 @@ | |||
17 | /* | 15 | /* |
18 | * # of m68k interrupts | 16 | * # of m68k interrupts |
19 | */ | 17 | */ |
20 | #define SYS_IRQS 8 | 18 | #define SYS_IRQS 8 |
21 | #define NR_IRQS (24+SYS_IRQS) | 19 | #define NR_IRQS (24 + SYS_IRQS) |
22 | 20 | ||
23 | #endif /* CONFIG_COLDFIRE */ | 21 | #endif /* CONFIG_COLDFIRE */ |
24 | 22 | ||
25 | /* | ||
26 | * Interrupt source definitions | ||
27 | * General interrupt sources are the level 1-7. | ||
28 | * Adding an interrupt service routine for one of these sources | ||
29 | * results in the addition of that routine to a chain of routines. | ||
30 | * Each one is called in succession. Each individual interrupt | ||
31 | * service routine should determine if the device associated with | ||
32 | * that routine requires service. | ||
33 | */ | ||
34 | 23 | ||
35 | #define IRQ1 (1) /* level 1 interrupt */ | ||
36 | #define IRQ2 (2) /* level 2 interrupt */ | ||
37 | #define IRQ3 (3) /* level 3 interrupt */ | ||
38 | #define IRQ4 (4) /* level 4 interrupt */ | ||
39 | #define IRQ5 (5) /* level 5 interrupt */ | ||
40 | #define IRQ6 (6) /* level 6 interrupt */ | ||
41 | #define IRQ7 (7) /* level 7 interrupt (non-maskable) */ | ||
42 | |||
43 | /* | ||
44 | * Machine specific interrupt sources. | ||
45 | * | ||
46 | * Adding an interrupt service routine for a source with this bit | ||
47 | * set indicates a special machine specific interrupt source. | ||
48 | * The machine specific files define these sources. | ||
49 | * | ||
50 | * The IRQ_MACHSPEC bit is now gone - the only thing it did was to | ||
51 | * introduce unnecessary overhead. | ||
52 | * | ||
53 | * All interrupt handling is actually machine specific so it is better | ||
54 | * to use function pointers, as used by the Sparc port, and select the | ||
55 | * interrupt handling functions when initializing the kernel. This way | ||
56 | * we save some unnecessary overhead at run-time. | ||
57 | * 01/11/97 - Jes | ||
58 | */ | ||
59 | |||
60 | extern void (*mach_enable_irq)(unsigned int); | ||
61 | extern void (*mach_disable_irq)(unsigned int); | ||
62 | |||
63 | /* | ||
64 | * various flags for request_irq() - the Amiga now uses the standard | ||
65 | * mechanism like all other architectures - IRQF_DISABLED and | ||
66 | * IRQF_SHARED are your friends. | ||
67 | */ | ||
68 | #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ | ||
69 | #define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ | ||
70 | #define IRQ_FLG_FAST (0x0004) | ||
71 | #define IRQ_FLG_SLOW (0x0008) | ||
72 | #define IRQ_FLG_STD (0x8000) /* internally used */ | ||
73 | |||
74 | #ifdef CONFIG_M68360 | ||
75 | |||
76 | #define CPM_INTERRUPT IRQ4 | ||
77 | |||
78 | /* see MC68360 User's Manual, p. 7-377 */ | ||
79 | #define CPM_VECTOR_BASE 0x04 /* 3 MSbits of CPM vector */ | ||
80 | |||
81 | #endif /* CONFIG_M68360 */ | ||
82 | |||
83 | /* | ||
84 | * Some drivers want these entry points | ||
85 | */ | ||
86 | #define enable_irq(x) do { } while (0) | ||
87 | #define disable_irq(x) do { } while (0) | ||
88 | #define disable_irq_nosync(x) disable_irq(x) | ||
89 | #define irq_canonicalize(irq) (irq) | 24 | #define irq_canonicalize(irq) (irq) |
90 | 25 | ||
91 | #endif /* _M68K_IRQ_H_ */ | 26 | #endif /* _M68KNOMMU_IRQ_H_ */ |
diff --git a/include/asm-m68knommu/irqnode.h b/include/asm-m68knommu/irqnode.h deleted file mode 100644 index 6132a9858b52..000000000000 --- a/include/asm-m68knommu/irqnode.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #ifndef _M68K_IRQNODE_H_ | ||
2 | #define _M68K_IRQNODE_H_ | ||
3 | |||
4 | #include <linux/interrupt.h> | ||
5 | |||
6 | /* | ||
7 | * This structure is used to chain together the ISRs for a particular | ||
8 | * interrupt source (if it supports chaining). | ||
9 | */ | ||
10 | typedef struct irq_node { | ||
11 | irq_handler_t handler; | ||
12 | unsigned long flags; | ||
13 | void *dev_id; | ||
14 | const char *devname; | ||
15 | struct irq_node *next; | ||
16 | } irq_node_t; | ||
17 | |||
18 | /* | ||
19 | * This structure has only 4 elements for speed reasons | ||
20 | */ | ||
21 | struct irq_entry { | ||
22 | irq_handler_t handler; | ||
23 | unsigned long flags; | ||
24 | void *dev_id; | ||
25 | const char *devname; | ||
26 | }; | ||
27 | |||
28 | /* count of spurious interrupts */ | ||
29 | extern volatile unsigned int num_spurious; | ||
30 | |||
31 | /* | ||
32 | * This function returns a new irq_node_t | ||
33 | */ | ||
34 | extern irq_node_t *new_irq_node(void); | ||
35 | |||
36 | #endif /* _M68K_IRQNODE_H_ */ | ||
diff --git a/include/asm-m68knommu/m68360.h b/include/asm-m68knommu/m68360.h index dd11b070884b..eb7d39ef2855 100644 --- a/include/asm-m68knommu/m68360.h +++ b/include/asm-m68knommu/m68360.h | |||
@@ -3,3 +3,11 @@ | |||
3 | #include "m68360_quicc.h" | 3 | #include "m68360_quicc.h" |
4 | #include "m68360_enet.h" | 4 | #include "m68360_enet.h" |
5 | 5 | ||
6 | #ifdef CONFIG_M68360 | ||
7 | |||
8 | #define CPM_INTERRUPT 4 | ||
9 | |||
10 | /* see MC68360 User's Manual, p. 7-377 */ | ||
11 | #define CPM_VECTOR_BASE 0x04 /* 3 MSbits of CPM vector */ | ||
12 | |||
13 | #endif /* CONFIG_M68360 */ | ||
diff --git a/include/asm-m68knommu/traps.h b/include/asm-m68knommu/traps.h index f2a81317cc10..d0671e5f8e29 100644 --- a/include/asm-m68knommu/traps.h +++ b/include/asm-m68knommu/traps.h | |||
@@ -16,6 +16,10 @@ | |||
16 | typedef void (*e_vector)(void); | 16 | typedef void (*e_vector)(void); |
17 | 17 | ||
18 | extern e_vector vectors[]; | 18 | extern e_vector vectors[]; |
19 | extern void init_vectors(void); | ||
20 | extern void enable_vector(unsigned int irq); | ||
21 | extern void disable_vector(unsigned int irq); | ||
22 | extern void ack_vector(unsigned int irq); | ||
19 | 23 | ||
20 | #endif | 24 | #endif |
21 | 25 | ||