aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/platforms
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-01-19 12:19:42 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-21 05:55:27 -0500
commit37808e47eab064006eb17d46cf15a098655940c4 (patch)
tree56804a90f0262568fd48cee072cbe07f45188e5d /arch/m32r/platforms
parent72bd198f1d8e3341ea55dc250830a92e2816d16a (diff)
m32r: Convert m32700ut lcdpld irq chip
Convert the irq chip 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/m32700ut/setup.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c
index bce70e1eb9e3..2074bcc841eb 100644
--- a/arch/m32r/platforms/m32700ut/setup.c
+++ b/arch/m32r/platforms/m32700ut/setup.c
@@ -226,42 +226,33 @@ static void enable_m32700ut_lcdpld_irq(unsigned int irq)
226 outw(data, port); 226 outw(data, port);
227} 227}
228 228
229static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) 229static void mask_m32700ut_lcdpld(struct irq_data *data)
230{ 230{
231 disable_m32700ut_lcdpld_irq(irq); 231 disable_m32700ut_lcdpld_irq(data->irq);
232} 232}
233 233
234static void end_m32700ut_lcdpld_irq(unsigned int irq) 234static void unmask_m32700ut_lcdpld(struct irq_data *data)
235{ 235{
236 enable_m32700ut_lcdpld_irq(irq); 236 enable_m32700ut_lcdpld_irq(data->irq);
237 enable_m32700ut_irq(M32R_IRQ_INT2); 237 enable_m32700ut_irq(M32R_IRQ_INT2);
238} 238}
239 239
240static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) 240static void shutdown_m32700ut_lcdpld(struct irq_data *data)
241{
242 enable_m32700ut_lcdpld_irq(irq);
243 return (0);
244}
245
246static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
247{ 241{
248 unsigned long port; 242 unsigned long port;
249 unsigned int pldirq; 243 unsigned int pldirq;
250 244
251 pldirq = irq2lcdpldirq(irq); 245 pldirq = irq2lcdpldirq(data->irq);
252 port = lcdpldirq2port(pldirq); 246 port = lcdpldirq2port(pldirq);
253 outw(PLD_ICUCR_ILEVEL7, port); 247 outw(PLD_ICUCR_ILEVEL7, port);
254} 248}
255 249
256static struct irq_chip m32700ut_lcdpld_irq_type = 250static struct irq_chip m32700ut_lcdpld_irq_type =
257{ 251{
258 .name = "M32700UT-PLD-LCD-IRQ", 252 .name = "M32700UT-PLD-LCD-IRQ",
259 .startup = startup_m32700ut_lcdpld_irq, 253 .irq_shutdown = shutdown_m32700ut_lcdpld,
260 .shutdown = shutdown_m32700ut_lcdpld_irq, 254 .irq_mask = mask_m32700ut_lcdpld,
261 .enable = enable_m32700ut_lcdpld_irq, 255 .irq_unmask = unmask_m32700ut_lcdpld,
262 .disable = disable_m32700ut_lcdpld_irq,
263 .ack = mask_and_ack_m32700ut_lcdpld,
264 .end = end_m32700ut_lcdpld_irq
265}; 256};
266 257
267void __init init_IRQ(void) 258void __init init_IRQ(void)
@@ -358,7 +349,8 @@ void __init init_IRQ(void)
358 349
359#if defined(CONFIG_USB) 350#if defined(CONFIG_USB)
360 outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 351 outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
361 set_irq_chip(M32700UT_LCD_IRQ_USB_INT1, &m32700ut_lcdpld_irq_type); 352 set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1,
353 &m32700ut_lcdpld_irq_type, handle_level_irq);
362 354
363 lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 355 lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
364 disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); 356 disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1);