summaryrefslogtreecommitdiffstats
path: root/arch/frv/kernel/irq-mb93093.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv/kernel/irq-mb93093.c')
-rw-r--r--arch/frv/kernel/irq-mb93093.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c
index f60db7988e78..a43a22158956 100644
--- a/arch/frv/kernel/irq-mb93093.c
+++ b/arch/frv/kernel/irq-mb93093.c
@@ -35,40 +35,44 @@
/*
* off-CPU FPGA PIC operations
*/
-static void frv_fpga_enable(unsigned int irq)
+static void frv_fpga_mask(unsigned int irq)
{
uint16_t imr = __get_IMR();
- imr &= ~(1 << (irq - IRQ_BASE_FPGA));
-
+ imr |= 1 << (irq - IRQ_BASE_FPGA);
__set_IMR(imr);
}
-static void frv_fpga_disable(unsigned int irq)
+static void frv_fpga_ack(unsigned int irq)
+{
+ __clr_IFR(1 << (irq - IRQ_BASE_FPGA));
+}
+
+static void frv_fpga_mask_ack(unsigned int irq)
{
uint16_t imr = __get_IMR();
imr |= 1 << (irq - IRQ_BASE_FPGA);
-
__set_IMR(imr);
-}
-static void frv_fpga_ack(unsigned int irq)
-{
__clr_IFR(1 << (irq - IRQ_BASE_FPGA));
}
-static void frv_fpga_end(unsigned int irq)
+static void frv_fpga_unmask(unsigned int irq)
{
+ uint16_t imr = __get_IMR();
+
+ imr &= ~(1 << (irq - IRQ_BASE_FPGA));
+
+ __set_IMR(imr);
}
static struct irq_chip frv_fpga_pic = {
.name = "mb93093",
- .enable = frv_fpga_enable,
- .disable = frv_fpga_disable,
.ack = frv_fpga_ack,
- .mask = frv_fpga_disable,
- .unmask = frv_fpga_enable,
+ .mask = frv_fpga_mask,
+ .mask_ack = frv_fpga_mask_ack,
+ .unmask = frv_fpga_unmask,
.end = frv_fpga_end,
};
@@ -78,7 +82,6 @@ static struct irq_chip frv_fpga_pic = {
static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
{
uint16_t imr, mask = (unsigned long) _mask;
- irqreturn_t iret = 0;
imr = __get_IMR();
mask = mask & ~imr & __get_IFR();
@@ -91,11 +94,10 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
irq = 31 - irq;
mask &= ~(1 << irq);
- if (__do_IRQ(IRQ_BASE_FPGA + irq, regs))
- iret |= IRQ_HANDLED;
+ generic_irq_handle(IRQ_BASE_FPGA + irq, regs);
}
- return iret;
+ return IRQ_HANDLED;
}
/*