diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-01-19 12:14:21 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-21 05:55:27 -0500 |
commit | 72bd198f1d8e3341ea55dc250830a92e2816d16a (patch) | |
tree | 084bad2600353ae147726e79e8f34711ffc6f55b /arch | |
parent | 63b549b6552c7869c25a1c60783aa86a3380e06c (diff) |
m32r: Convert m32700ut lanpld irq chip
Convert the irq chips to the new functions and use proper flow
handlers. handle_level_irq is appropriate.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m32r/platforms/m32700ut/setup.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c index 99d92411e84f..bce70e1eb9e3 100644 --- a/arch/m32r/platforms/m32700ut/setup.c +++ b/arch/m32r/platforms/m32700ut/setup.c | |||
@@ -166,42 +166,33 @@ static void enable_m32700ut_lanpld_irq(unsigned int irq) | |||
166 | outw(data, port); | 166 | outw(data, port); |
167 | } | 167 | } |
168 | 168 | ||
169 | static void mask_and_ack_m32700ut_lanpld(unsigned int irq) | 169 | static void mask_m32700ut_lanpld(struct irq_data *data) |
170 | { | 170 | { |
171 | disable_m32700ut_lanpld_irq(irq); | 171 | disable_m32700ut_lanpld_irq(data->irq); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void end_m32700ut_lanpld_irq(unsigned int irq) | 174 | static void unmask_m32700ut_lanpld(struct irq_data *data) |
175 | { | 175 | { |
176 | enable_m32700ut_lanpld_irq(irq); | 176 | enable_m32700ut_lanpld_irq(data->irq); |
177 | enable_m32700ut_irq(M32R_IRQ_INT0); | 177 | enable_m32700ut_irq(M32R_IRQ_INT0); |
178 | } | 178 | } |
179 | 179 | ||
180 | static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) | 180 | static void shutdown_m32700ut_lanpld(struct irq_data *data) |
181 | { | ||
182 | enable_m32700ut_lanpld_irq(irq); | ||
183 | return (0); | ||
184 | } | ||
185 | |||
186 | static void shutdown_m32700ut_lanpld_irq(unsigned int irq) | ||
187 | { | 181 | { |
188 | unsigned long port; | 182 | unsigned long port; |
189 | unsigned int pldirq; | 183 | unsigned int pldirq; |
190 | 184 | ||
191 | pldirq = irq2lanpldirq(irq); | 185 | pldirq = irq2lanpldirq(data->irq); |
192 | port = lanpldirq2port(pldirq); | 186 | port = lanpldirq2port(pldirq); |
193 | outw(PLD_ICUCR_ILEVEL7, port); | 187 | outw(PLD_ICUCR_ILEVEL7, port); |
194 | } | 188 | } |
195 | 189 | ||
196 | static struct irq_chip m32700ut_lanpld_irq_type = | 190 | static struct irq_chip m32700ut_lanpld_irq_type = |
197 | { | 191 | { |
198 | .name = "M32700UT-PLD-LAN-IRQ", | 192 | .name = "M32700UT-PLD-LAN-IRQ", |
199 | .startup = startup_m32700ut_lanpld_irq, | 193 | .irq_shutdown = shutdown_m32700ut_lanpld, |
200 | .shutdown = shutdown_m32700ut_lanpld_irq, | 194 | .irq_mask = mask_m32700ut_lanpld, |
201 | .enable = enable_m32700ut_lanpld_irq, | 195 | .irq_unmask = unmask_m32700ut_lanpld, |
202 | .disable = disable_m32700ut_lanpld_irq, | ||
203 | .ack = mask_and_ack_m32700ut_lanpld, | ||
204 | .end = end_m32700ut_lanpld_irq | ||
205 | }; | 196 | }; |
206 | 197 | ||
207 | /* | 198 | /* |
@@ -277,7 +268,8 @@ void __init init_IRQ(void) | |||
277 | { | 268 | { |
278 | #if defined(CONFIG_SMC91X) | 269 | #if defined(CONFIG_SMC91X) |
279 | /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ | 270 | /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ |
280 | set_irq_chip(M32700UT_LAN_IRQ_LAN, &m32700ut_lanpld_irq_type); | 271 | set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN, |
272 | &m32700ut_lanpld_irq_type, handle_level_irq); | ||
281 | lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ | 273 | lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ |
282 | disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); | 274 | disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); |
283 | #endif /* CONFIG_SMC91X */ | 275 | #endif /* CONFIG_SMC91X */ |