diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-01-19 12:58:45 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-21 05:55:29 -0500 |
commit | 1899a493b991cf9ea7a57d15b64588632fe32cf0 (patch) | |
tree | 1469941284984caefbed6f584e337b2244d32741 /arch/m32r/platforms | |
parent | 22cbc9384a495f2e6eb0d0fda91692431a28468e (diff) |
m32r: Convert opsput 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/m32r/platforms')
-rw-r--r-- | arch/m32r/platforms/opsput/setup.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/m32r/platforms/opsput/setup.c b/arch/m32r/platforms/opsput/setup.c index 00eb3b82bd95..7648c1dd8dee 100644 --- a/arch/m32r/platforms/opsput/setup.c +++ b/arch/m32r/platforms/opsput/setup.c | |||
@@ -167,42 +167,33 @@ static void enable_opsput_lanpld_irq(unsigned int irq) | |||
167 | outw(data, port); | 167 | outw(data, port); |
168 | } | 168 | } |
169 | 169 | ||
170 | static void mask_and_ack_opsput_lanpld(unsigned int irq) | 170 | static void mask_opsput_lanpld(struct irq_data *data) |
171 | { | 171 | { |
172 | disable_opsput_lanpld_irq(irq); | 172 | disable_opsput_lanpld_irq(data->irq); |
173 | } | 173 | } |
174 | 174 | ||
175 | static void end_opsput_lanpld_irq(unsigned int irq) | 175 | static void unmask_opsput_lanpld(struct irq_data *data) |
176 | { | 176 | { |
177 | enable_opsput_lanpld_irq(irq); | 177 | enable_opsput_lanpld_irq(data->irq); |
178 | enable_opsput_irq(M32R_IRQ_INT0); | 178 | enable_opsput_irq(M32R_IRQ_INT0); |
179 | } | 179 | } |
180 | 180 | ||
181 | static unsigned int startup_opsput_lanpld_irq(unsigned int irq) | 181 | static void shutdown_opsput_lanpld(struct irq_data *data) |
182 | { | ||
183 | enable_opsput_lanpld_irq(irq); | ||
184 | return (0); | ||
185 | } | ||
186 | |||
187 | static void shutdown_opsput_lanpld_irq(unsigned int irq) | ||
188 | { | 182 | { |
189 | unsigned long port; | 183 | unsigned long port; |
190 | unsigned int pldirq; | 184 | unsigned int pldirq; |
191 | 185 | ||
192 | pldirq = irq2lanpldirq(irq); | 186 | pldirq = irq2lanpldirq(data->irq); |
193 | port = lanpldirq2port(pldirq); | 187 | port = lanpldirq2port(pldirq); |
194 | outw(PLD_ICUCR_ILEVEL7, port); | 188 | outw(PLD_ICUCR_ILEVEL7, port); |
195 | } | 189 | } |
196 | 190 | ||
197 | static struct irq_chip opsput_lanpld_irq_type = | 191 | static struct irq_chip opsput_lanpld_irq_type = |
198 | { | 192 | { |
199 | .name = "OPSPUT-PLD-LAN-IRQ", | 193 | .name = "OPSPUT-PLD-LAN-IRQ", |
200 | .startup = startup_opsput_lanpld_irq, | 194 | .irq_shutdown = shutdown_opsput_lanpld, |
201 | .shutdown = shutdown_opsput_lanpld_irq, | 195 | .irq_mask = mask_opsput_lanpld, |
202 | .enable = enable_opsput_lanpld_irq, | 196 | .irq_unmask = unmask_opsput_lanpld, |
203 | .disable = disable_opsput_lanpld_irq, | ||
204 | .ack = mask_and_ack_opsput_lanpld, | ||
205 | .end = end_opsput_lanpld_irq | ||
206 | }; | 197 | }; |
207 | 198 | ||
208 | /* | 199 | /* |
@@ -278,7 +269,8 @@ void __init init_IRQ(void) | |||
278 | { | 269 | { |
279 | #if defined(CONFIG_SMC91X) | 270 | #if defined(CONFIG_SMC91X) |
280 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ | 271 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ |
281 | set_irq_chip(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type); | 272 | set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, |
273 | handle_level_irq); | ||
282 | lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ | 274 | lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ |
283 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); | 275 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); |
284 | #endif /* CONFIG_SMC91X */ | 276 | #endif /* CONFIG_SMC91X */ |