diff options
author | Matt Fleming <mjf@gentoo.org> | 2008-12-14 07:02:25 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-12-22 04:44:05 -0500 |
commit | bd0a22d21f26864792a0e49c20f5bd25d6c335e4 (patch) | |
tree | 5574cd2c9fda8686d96539cb8ce8f1d0a763d66f /arch/sh/boards/mach-systemh | |
parent | be729fd8900f0026238539de46d867d232d1e913 (diff) |
sh: Convert SystemH board support from hw_interrupt_type to irq_chip
... as part of the hw_interrupt_type to irq_chip crusade.
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-systemh')
-rw-r--r-- | arch/sh/boards/mach-systemh/irq.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/arch/sh/boards/mach-systemh/irq.c b/arch/sh/boards/mach-systemh/irq.c index 538406872a89..986a0e71d220 100644 --- a/arch/sh/boards/mach-systemh/irq.c +++ b/arch/sh/boards/mach-systemh/irq.c | |||
@@ -12,8 +12,8 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/io.h> | ||
15 | 16 | ||
16 | #include <asm/io.h> | ||
17 | #include <mach/systemh7751.h> | 17 | #include <mach/systemh7751.h> |
18 | #include <asm/smc37c93x.h> | 18 | #include <asm/smc37c93x.h> |
19 | 19 | ||
@@ -24,35 +24,17 @@ static unsigned long *systemh_irq_mask_register = (unsigned long *)0xB3F10004; | |||
24 | static unsigned long *systemh_irq_request_register = (unsigned long *)0xB3F10000; | 24 | static unsigned long *systemh_irq_request_register = (unsigned long *)0xB3F10000; |
25 | 25 | ||
26 | /* forward declaration */ | 26 | /* forward declaration */ |
27 | static unsigned int startup_systemh_irq(unsigned int irq); | ||
28 | static void shutdown_systemh_irq(unsigned int irq); | ||
29 | static void enable_systemh_irq(unsigned int irq); | 27 | static void enable_systemh_irq(unsigned int irq); |
30 | static void disable_systemh_irq(unsigned int irq); | 28 | static void disable_systemh_irq(unsigned int irq); |
31 | static void mask_and_ack_systemh(unsigned int); | 29 | static void mask_and_ack_systemh(unsigned int); |
32 | static void end_systemh_irq(unsigned int irq); | ||
33 | 30 | ||
34 | /* hw_interrupt_type */ | 31 | static struct irq_chip systemh_irq_type = { |
35 | static struct hw_interrupt_type systemh_irq_type = { | 32 | .name = " SystemH Register", |
36 | .typename = " SystemH Register", | 33 | .unmask = enable_systemh_irq, |
37 | .startup = startup_systemh_irq, | 34 | .mask = disable_systemh_irq, |
38 | .shutdown = shutdown_systemh_irq, | ||
39 | .enable = enable_systemh_irq, | ||
40 | .disable = disable_systemh_irq, | ||
41 | .ack = mask_and_ack_systemh, | 35 | .ack = mask_and_ack_systemh, |
42 | .end = end_systemh_irq | ||
43 | }; | 36 | }; |
44 | 37 | ||
45 | static unsigned int startup_systemh_irq(unsigned int irq) | ||
46 | { | ||
47 | enable_systemh_irq(irq); | ||
48 | return 0; /* never anything pending */ | ||
49 | } | ||
50 | |||
51 | static void shutdown_systemh_irq(unsigned int irq) | ||
52 | { | ||
53 | disable_systemh_irq(irq); | ||
54 | } | ||
55 | |||
56 | static void disable_systemh_irq(unsigned int irq) | 38 | static void disable_systemh_irq(unsigned int irq) |
57 | { | 39 | { |
58 | if (systemh_irq_mask_register) { | 40 | if (systemh_irq_mask_register) { |
@@ -86,16 +68,9 @@ static void mask_and_ack_systemh(unsigned int irq) | |||
86 | disable_systemh_irq(irq); | 68 | disable_systemh_irq(irq); |
87 | } | 69 | } |
88 | 70 | ||
89 | static void end_systemh_irq(unsigned int irq) | ||
90 | { | ||
91 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
92 | enable_systemh_irq(irq); | ||
93 | } | ||
94 | |||
95 | void make_systemh_irq(unsigned int irq) | 71 | void make_systemh_irq(unsigned int irq) |
96 | { | 72 | { |
97 | disable_irq_nosync(irq); | 73 | disable_irq_nosync(irq); |
98 | irq_desc[irq].chip = &systemh_irq_type; | 74 | set_irq_chip_and_handler(irq, &systemh_irq_type, handle_level_irq); |
99 | disable_systemh_irq(irq); | 75 | disable_systemh_irq(irq); |
100 | } | 76 | } |
101 | |||