Commit 37808e47 authored by Thomas Gleixner's avatar Thomas Gleixner

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: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
parent 72bd198f
...@@ -226,29 +226,23 @@ static void enable_m32700ut_lcdpld_irq(unsigned int irq) ...@@ -226,29 +226,23 @@ static void enable_m32700ut_lcdpld_irq(unsigned int irq)
outw(data, port); outw(data, port);
} }
static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) static void mask_m32700ut_lcdpld(struct irq_data *data)
{ {
disable_m32700ut_lcdpld_irq(irq); disable_m32700ut_lcdpld_irq(data->irq);
} }
static void end_m32700ut_lcdpld_irq(unsigned int irq) static void unmask_m32700ut_lcdpld(struct irq_data *data)
{ {
enable_m32700ut_lcdpld_irq(irq); enable_m32700ut_lcdpld_irq(data->irq);
enable_m32700ut_irq(M32R_IRQ_INT2); enable_m32700ut_irq(M32R_IRQ_INT2);
} }
static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) static void shutdown_m32700ut_lcdpld(struct irq_data *data)
{
enable_m32700ut_lcdpld_irq(irq);
return (0);
}
static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
{ {
unsigned long port; unsigned long port;
unsigned int pldirq; unsigned int pldirq;
pldirq = irq2lcdpldirq(irq); pldirq = irq2lcdpldirq(data->irq);
port = lcdpldirq2port(pldirq); port = lcdpldirq2port(pldirq);
outw(PLD_ICUCR_ILEVEL7, port); outw(PLD_ICUCR_ILEVEL7, port);
} }
...@@ -256,12 +250,9 @@ static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) ...@@ -256,12 +250,9 @@ static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
static struct irq_chip m32700ut_lcdpld_irq_type = static struct irq_chip m32700ut_lcdpld_irq_type =
{ {
.name = "M32700UT-PLD-LCD-IRQ", .name = "M32700UT-PLD-LCD-IRQ",
.startup = startup_m32700ut_lcdpld_irq, .irq_shutdown = shutdown_m32700ut_lcdpld,
.shutdown = shutdown_m32700ut_lcdpld_irq, .irq_mask = mask_m32700ut_lcdpld,
.enable = enable_m32700ut_lcdpld_irq, .irq_unmask = unmask_m32700ut_lcdpld,
.disable = disable_m32700ut_lcdpld_irq,
.ack = mask_and_ack_m32700ut_lcdpld,
.end = end_m32700ut_lcdpld_irq
}; };
void __init init_IRQ(void) void __init init_IRQ(void)
...@@ -358,7 +349,8 @@ void __init init_IRQ(void) ...@@ -358,7 +349,8 @@ void __init init_IRQ(void)
#if defined(CONFIG_USB) #if defined(CONFIG_USB)
outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
set_irq_chip(M32700UT_LCD_IRQ_USB_INT1, &m32700ut_lcdpld_irq_type); set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1,
&m32700ut_lcdpld_irq_type, handle_level_irq);
lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment