Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b141fa6 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

m32r: Convert opsput_lcdpld irq chip



Convert the irq chips 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 1899a493
Loading
Loading
Loading
Loading
+16 −26
Original line number Original line Diff line number Diff line
@@ -227,42 +227,32 @@ static void enable_opsput_lcdpld_irq(unsigned int irq)
	outw(data, port);
	outw(data, port);
}
}


static void mask_and_ack_opsput_lcdpld(unsigned int irq)
static void mask_opsput_lcdpld(struct irq_data *data)
{
{
	disable_opsput_lcdpld_irq(irq);
	disable_opsput_lcdpld_irq(data->irq);
}
}


static void end_opsput_lcdpld_irq(unsigned int irq)
static void unmask_opsput_lcdpld(struct irq_data *data)
{
{
	enable_opsput_lcdpld_irq(irq);
	enable_opsput_lcdpld_irq(data->irq);
	enable_opsput_irq(M32R_IRQ_INT2);
	enable_opsput_irq(M32R_IRQ_INT2);
}
}


static unsigned int startup_opsput_lcdpld_irq(unsigned int irq)
static void shutdown_opsput_lcdpld(struct irq_data *data)
{
	enable_opsput_lcdpld_irq(irq);
	return (0);
}

static void shutdown_opsput_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);
}
}


static struct irq_chip opsput_lcdpld_irq_type =
static struct irq_chip opsput_lcdpld_irq_type = {
{
	.name		= "OPSPUT-PLD-LCD-IRQ",
	"OPSPUT-PLD-LCD-IRQ",
	.irq_shutdown	= shutdown_opsput_lcdpld,
	startup_opsput_lcdpld_irq,
	.irq_mask	= mask_opsput_lcdpld,
	shutdown_opsput_lcdpld_irq,
	.irq_unmask	= unmask_opsput_lcdpld,
	enable_opsput_lcdpld_irq,
	disable_opsput_lcdpld_irq,
	mask_and_ack_opsput_lcdpld,
	end_opsput_lcdpld_irq
};
};


void __init init_IRQ(void)
void __init init_IRQ(void)
@@ -359,8 +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_and_handler(OPSPUT_LCD_IRQ_USB_INT1,
    set_irq_chip(OPSPUT_LCD_IRQ_USB_INT1, &opsput_lcdpld_irq_type);
				 &opsput_lcdpld_irq_type, handle_level_irq);
	lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* "L" level sense */
	lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* "L" level sense */
	disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
	disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
#endif
#endif