mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
m68knommu: Convert 5249 intc irq_chip to new functions
/me idly wonders what sets the handlers for this chip. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
parent
2730158ab2
commit
e474563eba
@ -17,32 +17,32 @@
|
||||
#include <asm/coldfire.h>
|
||||
#include <asm/mcfsim.h>
|
||||
|
||||
static void intc2_irq_gpio_mask(unsigned int irq)
|
||||
static void intc2_irq_gpio_mask(struct irq_data *d)
|
||||
{
|
||||
u32 imr;
|
||||
imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
|
||||
imr &= ~(0x1 << (irq - MCFINTC2_GPIOIRQ0));
|
||||
imr &= ~(0x1 << (d->irq - MCFINTC2_GPIOIRQ0));
|
||||
writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
|
||||
}
|
||||
|
||||
static void intc2_irq_gpio_unmask(unsigned int irq)
|
||||
static void intc2_irq_gpio_unmask(struct irq_data *d)
|
||||
{
|
||||
u32 imr;
|
||||
imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
|
||||
imr |= (0x1 << (irq - MCFINTC2_GPIOIRQ0));
|
||||
imr |= (0x1 << (d->irq - MCFINTC2_GPIOIRQ0));
|
||||
writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
|
||||
}
|
||||
|
||||
static void intc2_irq_gpio_ack(unsigned int irq)
|
||||
static void intc2_irq_gpio_ack(struct irq_data *d)
|
||||
{
|
||||
writel(0x1 << (irq - MCFINTC2_GPIOIRQ0), MCF_MBAR2 + MCFSIM2_GPIOINTCLEAR);
|
||||
writel(0x1 << (d->irq - MCFINTC2_GPIOIRQ0), MCF_MBAR2 + MCFSIM2_GPIOINTCLEAR);
|
||||
}
|
||||
|
||||
static struct irq_chip intc2_irq_gpio_chip = {
|
||||
.name = "CF-INTC2",
|
||||
.mask = intc2_irq_gpio_mask,
|
||||
.unmask = intc2_irq_gpio_unmask,
|
||||
.ack = intc2_irq_gpio_ack,
|
||||
.irq_mask = intc2_irq_gpio_mask,
|
||||
.irq_unmask = intc2_irq_gpio_unmask,
|
||||
.irq_ack = intc2_irq_gpio_ack,
|
||||
};
|
||||
|
||||
static int __init mcf_intc2_init(void)
|
||||
@ -51,7 +51,7 @@ static int __init mcf_intc2_init(void)
|
||||
|
||||
/* GPIO interrupt sources */
|
||||
for (irq = MCFINTC2_GPIOIRQ0; (irq <= MCFINTC2_GPIOIRQ7); irq++) {
|
||||
irq_desc[irq].chip = &intc2_irq_gpio_chip;
|
||||
set_irq_chip(irq, &intc2_irq_gpio_chip);
|
||||
set_irq_handler(irq, handle_edge_irq);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user