summaryrefslogtreecommitdiff
path: root/arch/frv/kernel/irq-mb93493.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-09-25 23:32:06 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 08:48:53 -0700
commit88d6e19900366781739df033e9c0e2532e715fa5 (patch)
tree97c6d48f0d707002c8239efb6e865a0133d69b68 /arch/frv/kernel/irq-mb93493.c
parent1bcbba306048ed86b935d57a95d887c23d52c94b (diff)
[PATCH] FRV: improve FRV's use of generic IRQ handling
Improve FRV's use of generic IRQ handling: (*) Use generic_handle_irq() rather than __do_IRQ() as the latter is obsolete. (*) Don't implement enable() and disable() ops as these will fall back to using unmask() and mask(). (*) Provide mask_ack() functions to avoid a call each to mask() and ack(). (*) Make the cascade handlers always return IRQ_HANDLED. (*) Implement the mask() and unmask() functions in the same order as they're listed in the ops table. Signed-off-by: David Howells <dhowells@redhat.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/frv/kernel/irq-mb93493.c')
-rw-r--r--arch/frv/kernel/irq-mb93493.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c
index 8ad9abfc7c1..39c0188a349 100644
--- a/arch/frv/kernel/irq-mb93493.c
+++ b/arch/frv/kernel/irq-mb93493.c
@@ -43,8 +43,9 @@
/*
* daughter board PIC operations
+ * - there is no way to ACK interrupts in the MB93493 chip
*/
-static void frv_mb93493_enable(unsigned int irq)
+static void frv_mb93493_mask(unsigned int irq)
{
uint32_t iqsr;
volatile void *piqsr;
@@ -55,11 +56,15 @@ static void frv_mb93493_enable(unsigned int irq)
piqsr = __addr_MB93493_IQSR(0);
iqsr = readl(piqsr);
- iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16);
+ iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16));
writel(iqsr, piqsr);
}
-static void frv_mb93493_disable(unsigned int irq)
+static void frv_mb93493_ack(unsigned int irq)
+{
+}
+
+static void frv_mb93493_unmask(unsigned int irq)
{
uint32_t iqsr;
volatile void *piqsr;
@@ -70,26 +75,16 @@ static void frv_mb93493_disable(unsigned int irq)
piqsr = __addr_MB93493_IQSR(0);
iqsr = readl(piqsr);
- iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16));
+ iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16);
writel(iqsr, piqsr);
}
-static void frv_mb93493_ack(unsigned int irq)
-{
-}
-
-static void frv_mb93493_end(unsigned int irq)
-{
-}
-
static struct irq_chip frv_mb93493_pic = {
.name = "mb93093",
- .enable = frv_mb93493_enable,
- .disable = frv_mb93493_disable,
.ack = frv_mb93493_ack,
- .mask = frv_mb93493_disable,
- .unmask = frv_mb93493_enable,
- .end = frv_mb93493_end,
+ .mask = frv_mb93493_mask,
+ .mask_ack = frv_mb93493_mask,
+ .unmask = frv_mb93493_unmask,
};
/*
@@ -98,7 +93,6 @@ static struct irq_chip frv_mb93493_pic = {
static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs)
{
volatile void *piqsr = _piqsr;
- irqreturn_t iret = 0;
uint32_t iqsr;
iqsr = readl(piqsr);
@@ -112,11 +106,10 @@ static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs
irq = 31 - irq;
iqsr &= ~(1 << irq);
- if (__do_IRQ(IRQ_BASE_MB93493 + irq, regs))
- iret |= IRQ_HANDLED;
+ generic_handle_irq(IRQ_BASE_MB93493 + irq, regs);
}
- return iret;
+ return IRQ_HANDLED;
}
/*