diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-11-01 12:08:36 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-11-29 20:14:46 -0500 |
commit | 1603b5aca4f15b34848fb5594d0c7b6333b99144 (patch) | |
tree | 79272aa41d6510b7256df62e287676885c3960cf /arch/mips/vr41xx/nec-cmbvr4133 | |
parent | c87b6ebaea034c0e0ce86127870cf1511a307b64 (diff) |
[MIPS] IRQ cleanups
This is a big irq cleanup patch.
* Use set_irq_chip() to register irq_chip.
* Initialize .mask, .unmask, .mask_ack field. Functions for these
method are already exist in most case.
* Do not initialize .startup, .shutdown, .enable, .disable fields if
default routines provided by irq_chip_set_defaults() were suitable.
* Remove redundant irq_desc initializations.
* Remove unnecessary local_irq_save/local_irq_restore, spin_lock.
With this cleanup, it would be easy to switch to slightly lightwait
irq flow handlers (handle_level_irq(), etc.) instead of __do_IRQ().
Though whole this patch is quite large, changes in each irq_chip are
not quite simple. Please review and test on your platform. Thanks.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/vr41xx/nec-cmbvr4133')
-rw-r--r-- | arch/mips/vr41xx/nec-cmbvr4133/irq.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/irq.c b/arch/mips/vr41xx/nec-cmbvr4133/irq.c index 2483487344c2..a039bb7251ff 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/irq.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/irq.c | |||
@@ -30,17 +30,6 @@ extern void init_8259A(int hoge); | |||
30 | 30 | ||
31 | extern int vr4133_rockhopper; | 31 | extern int vr4133_rockhopper; |
32 | 32 | ||
33 | static unsigned int startup_i8259_irq(unsigned int irq) | ||
34 | { | ||
35 | enable_8259A_irq(irq - I8259_IRQ_BASE); | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | static void shutdown_i8259_irq(unsigned int irq) | ||
40 | { | ||
41 | disable_8259A_irq(irq - I8259_IRQ_BASE); | ||
42 | } | ||
43 | |||
44 | static void enable_i8259_irq(unsigned int irq) | 33 | static void enable_i8259_irq(unsigned int irq) |
45 | { | 34 | { |
46 | enable_8259A_irq(irq - I8259_IRQ_BASE); | 35 | enable_8259A_irq(irq - I8259_IRQ_BASE); |
@@ -64,11 +53,10 @@ static void end_i8259_irq(unsigned int irq) | |||
64 | 53 | ||
65 | static struct irq_chip i8259_irq_type = { | 54 | static struct irq_chip i8259_irq_type = { |
66 | .typename = "XT-PIC", | 55 | .typename = "XT-PIC", |
67 | .startup = startup_i8259_irq, | ||
68 | .shutdown = shutdown_i8259_irq, | ||
69 | .enable = enable_i8259_irq, | ||
70 | .disable = disable_i8259_irq, | ||
71 | .ack = ack_i8259_irq, | 56 | .ack = ack_i8259_irq, |
57 | .mask = disable_i8259_irq, | ||
58 | .mask_ack = ack_i8259_irq, | ||
59 | .unmask = enable_i8259_irq, | ||
72 | .end = end_i8259_irq, | 60 | .end = end_i8259_irq, |
73 | }; | 61 | }; |
74 | 62 | ||
@@ -104,7 +92,7 @@ void __init rockhopper_init_irq(void) | |||
104 | } | 92 | } |
105 | 93 | ||
106 | for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) | 94 | for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) |
107 | irq_desc[i].chip = &i8259_irq_type; | 95 | set_irq_chip(i, &i8259_irq_type); |
108 | 96 | ||
109 | setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); | 97 | setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); |
110 | 98 | ||