diff options
author | Matt Fleming <mjf@gentoo.org> | 2008-12-14 07:02:27 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-12-22 04:44:06 -0500 |
commit | 1a94757fae2ac2a9971694b55972f65a396a2f31 (patch) | |
tree | 6afe66c533c6a1141dc5d8929b516af983575dfc /arch/sh | |
parent | e85a47744bbdfbcc65c94b2af67499f861c6fa42 (diff) |
sh: Convert Cayman boards from hw_interrupt_type to irq_chip
I've been unable to even compile-test this change because I don't have
an sh5 toolchain. All uses of hw_interrupt_type for SuperH boards have
now been converted to use irq_chip.
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mach-cayman/irq.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/arch/sh/boards/mach-cayman/irq.c b/arch/sh/boards/mach-cayman/irq.c index ceb37ae92c70..da62ad516994 100644 --- a/arch/sh/boards/mach-cayman/irq.c +++ b/arch/sh/boards/mach-cayman/irq.c | |||
@@ -94,31 +94,11 @@ static void ack_cayman_irq(unsigned int irq) | |||
94 | disable_cayman_irq(irq); | 94 | disable_cayman_irq(irq); |
95 | } | 95 | } |
96 | 96 | ||
97 | static void end_cayman_irq(unsigned int irq) | 97 | struct irq_chip cayman_irq_type = { |
98 | { | 98 | .name = "Cayman-IRQ", |
99 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | 99 | .unmask = enable_cayman_irq, |
100 | enable_cayman_irq(irq); | 100 | .mask = disable_cayman_irq, |
101 | } | 101 | .mask_ack = ack_cayman_irq, |
102 | |||
103 | static unsigned int startup_cayman_irq(unsigned int irq) | ||
104 | { | ||
105 | enable_cayman_irq(irq); | ||
106 | return 0; /* never anything pending */ | ||
107 | } | ||
108 | |||
109 | static void shutdown_cayman_irq(unsigned int irq) | ||
110 | { | ||
111 | disable_cayman_irq(irq); | ||
112 | } | ||
113 | |||
114 | struct hw_interrupt_type cayman_irq_type = { | ||
115 | .typename = "Cayman-IRQ", | ||
116 | .startup = startup_cayman_irq, | ||
117 | .shutdown = shutdown_cayman_irq, | ||
118 | .enable = enable_cayman_irq, | ||
119 | .disable = disable_cayman_irq, | ||
120 | .ack = ack_cayman_irq, | ||
121 | .end = end_cayman_irq, | ||
122 | }; | 102 | }; |
123 | 103 | ||
124 | int cayman_irq_demux(int evt) | 104 | int cayman_irq_demux(int evt) |
@@ -187,8 +167,9 @@ void init_cayman_irq(void) | |||
187 | return; | 167 | return; |
188 | } | 168 | } |
189 | 169 | ||
190 | for (i=0; i<NR_EXT_IRQS; i++) { | 170 | for (i = 0; i < NR_EXT_IRQS; i++) { |
191 | irq_desc[START_EXT_IRQS + i].chip = &cayman_irq_type; | 171 | set_irq_chip_and_handler(START_EXT_IRQS + i, &cayman_irq_type, |
172 | handle_level_irq); | ||
192 | } | 173 | } |
193 | 174 | ||
194 | /* Setup the SMSC interrupt */ | 175 | /* Setup the SMSC interrupt */ |