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/mips-boards/atlas | |
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/mips-boards/atlas')
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_int.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index be624b8c3b0e..7c710040d3f1 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c | |||
@@ -62,16 +62,6 @@ void enable_atlas_irq(unsigned int irq_nr) | |||
62 | iob(); | 62 | iob(); |
63 | } | 63 | } |
64 | 64 | ||
65 | static unsigned int startup_atlas_irq(unsigned int irq) | ||
66 | { | ||
67 | enable_atlas_irq(irq); | ||
68 | return 0; /* never anything pending */ | ||
69 | } | ||
70 | |||
71 | #define shutdown_atlas_irq disable_atlas_irq | ||
72 | |||
73 | #define mask_and_ack_atlas_irq disable_atlas_irq | ||
74 | |||
75 | static void end_atlas_irq(unsigned int irq) | 65 | static void end_atlas_irq(unsigned int irq) |
76 | { | 66 | { |
77 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | 67 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) |
@@ -80,11 +70,10 @@ static void end_atlas_irq(unsigned int irq) | |||
80 | 70 | ||
81 | static struct irq_chip atlas_irq_type = { | 71 | static struct irq_chip atlas_irq_type = { |
82 | .typename = "Atlas", | 72 | .typename = "Atlas", |
83 | .startup = startup_atlas_irq, | 73 | .ack = disable_atlas_irq, |
84 | .shutdown = shutdown_atlas_irq, | 74 | .mask = disable_atlas_irq, |
85 | .enable = enable_atlas_irq, | 75 | .mask_ack = disable_atlas_irq, |
86 | .disable = disable_atlas_irq, | 76 | .unmask = enable_atlas_irq, |
87 | .ack = mask_and_ack_atlas_irq, | ||
88 | .end = end_atlas_irq, | 77 | .end = end_atlas_irq, |
89 | }; | 78 | }; |
90 | 79 | ||
@@ -217,13 +206,8 @@ static inline void init_atlas_irqs (int base) | |||
217 | */ | 206 | */ |
218 | atlas_hw0_icregs->intrsten = 0xffffffff; | 207 | atlas_hw0_icregs->intrsten = 0xffffffff; |
219 | 208 | ||
220 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) { | 209 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) |
221 | irq_desc[i].status = IRQ_DISABLED; | 210 | set_irq_chip(i, &atlas_irq_type); |
222 | irq_desc[i].action = 0; | ||
223 | irq_desc[i].depth = 1; | ||
224 | irq_desc[i].chip = &atlas_irq_type; | ||
225 | spin_lock_init(&irq_desc[i].lock); | ||
226 | } | ||
227 | } | 211 | } |
228 | 212 | ||
229 | static struct irqaction atlasirq = { | 213 | static struct irqaction atlasirq = { |