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/sibyte/bcm1480 | |
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/sibyte/bcm1480')
-rw-r--r-- | arch/mips/sibyte/bcm1480/irq.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index 8b1f41484923..2e8f6b2e2420 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
@@ -45,11 +45,9 @@ | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | 47 | ||
48 | #define shutdown_bcm1480_irq disable_bcm1480_irq | ||
49 | static void end_bcm1480_irq(unsigned int irq); | 48 | static void end_bcm1480_irq(unsigned int irq); |
50 | static void enable_bcm1480_irq(unsigned int irq); | 49 | static void enable_bcm1480_irq(unsigned int irq); |
51 | static void disable_bcm1480_irq(unsigned int irq); | 50 | static void disable_bcm1480_irq(unsigned int irq); |
52 | static unsigned int startup_bcm1480_irq(unsigned int irq); | ||
53 | static void ack_bcm1480_irq(unsigned int irq); | 51 | static void ack_bcm1480_irq(unsigned int irq); |
54 | #ifdef CONFIG_SMP | 52 | #ifdef CONFIG_SMP |
55 | static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask); | 53 | static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask); |
@@ -85,11 +83,10 @@ extern char sb1250_duart_present[]; | |||
85 | 83 | ||
86 | static struct irq_chip bcm1480_irq_type = { | 84 | static struct irq_chip bcm1480_irq_type = { |
87 | .typename = "BCM1480-IMR", | 85 | .typename = "BCM1480-IMR", |
88 | .startup = startup_bcm1480_irq, | ||
89 | .shutdown = shutdown_bcm1480_irq, | ||
90 | .enable = enable_bcm1480_irq, | ||
91 | .disable = disable_bcm1480_irq, | ||
92 | .ack = ack_bcm1480_irq, | 86 | .ack = ack_bcm1480_irq, |
87 | .mask = disable_bcm1480_irq, | ||
88 | .mask_ack = ack_bcm1480_irq, | ||
89 | .unmask = enable_bcm1480_irq, | ||
93 | .end = end_bcm1480_irq, | 90 | .end = end_bcm1480_irq, |
94 | #ifdef CONFIG_SMP | 91 | #ifdef CONFIG_SMP |
95 | .set_affinity = bcm1480_set_affinity | 92 | .set_affinity = bcm1480_set_affinity |
@@ -188,14 +185,6 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask) | |||
188 | 185 | ||
189 | /*****************************************************************************/ | 186 | /*****************************************************************************/ |
190 | 187 | ||
191 | static unsigned int startup_bcm1480_irq(unsigned int irq) | ||
192 | { | ||
193 | bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq); | ||
194 | |||
195 | return 0; /* never anything pending */ | ||
196 | } | ||
197 | |||
198 | |||
199 | static void disable_bcm1480_irq(unsigned int irq) | 188 | static void disable_bcm1480_irq(unsigned int irq) |
200 | { | 189 | { |
201 | bcm1480_mask_irq(bcm1480_irq_owner[irq], irq); | 190 | bcm1480_mask_irq(bcm1480_irq_owner[irq], irq); |
@@ -270,16 +259,9 @@ void __init init_bcm1480_irqs(void) | |||
270 | { | 259 | { |
271 | int i; | 260 | int i; |
272 | 261 | ||
273 | for (i = 0; i < NR_IRQS; i++) { | 262 | for (i = 0; i < BCM1480_NR_IRQS; i++) { |
274 | irq_desc[i].status = IRQ_DISABLED; | 263 | set_irq_chip(i, &bcm1480_irq_type); |
275 | irq_desc[i].action = 0; | 264 | bcm1480_irq_owner[i] = 0; |
276 | irq_desc[i].depth = 1; | ||
277 | if (i < BCM1480_NR_IRQS) { | ||
278 | irq_desc[i].chip = &bcm1480_irq_type; | ||
279 | bcm1480_irq_owner[i] = 0; | ||
280 | } else { | ||
281 | irq_desc[i].chip = &no_irq_chip; | ||
282 | } | ||
283 | } | 265 | } |
284 | } | 266 | } |
285 | 267 | ||