sh: Convert Cayman boards from hw_interrupt_type to irq_chip
I've been unable to even compile-test this change because I don't have an sh5 toolchain. All uses of hw_interrupt_type for SuperH boards have now been converted to use irq_chip. Signed-off-by: Matt Fleming <mjf@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -94,31 +94,11 @@ static void ack_cayman_irq(unsigned int irq)
|
|||||||
disable_cayman_irq(irq);
|
disable_cayman_irq(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void end_cayman_irq(unsigned int irq)
|
struct irq_chip cayman_irq_type = {
|
||||||
{
|
.name = "Cayman-IRQ",
|
||||||
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
.unmask = enable_cayman_irq,
|
||||||
enable_cayman_irq(irq);
|
.mask = disable_cayman_irq,
|
||||||
}
|
.mask_ack = ack_cayman_irq,
|
||||||
|
|
||||||
static unsigned int startup_cayman_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
enable_cayman_irq(irq);
|
|
||||||
return 0; /* never anything pending */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void shutdown_cayman_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
disable_cayman_irq(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct hw_interrupt_type cayman_irq_type = {
|
|
||||||
.typename = "Cayman-IRQ",
|
|
||||||
.startup = startup_cayman_irq,
|
|
||||||
.shutdown = shutdown_cayman_irq,
|
|
||||||
.enable = enable_cayman_irq,
|
|
||||||
.disable = disable_cayman_irq,
|
|
||||||
.ack = ack_cayman_irq,
|
|
||||||
.end = end_cayman_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int cayman_irq_demux(int evt)
|
int cayman_irq_demux(int evt)
|
||||||
@@ -187,8 +167,9 @@ void init_cayman_irq(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<NR_EXT_IRQS; i++) {
|
for (i = 0; i < NR_EXT_IRQS; i++) {
|
||||||
irq_desc[START_EXT_IRQS + i].chip = &cayman_irq_type;
|
set_irq_chip_and_handler(START_EXT_IRQS + i, &cayman_irq_type,
|
||||||
|
handle_level_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the SMSC interrupt */
|
/* Setup the SMSC interrupt */
|
||||||
|
Reference in New Issue
Block a user