diff options
Diffstat (limited to 'arch/frv/kernel/irq-mb93093.c')
-rw-r--r-- | arch/frv/kernel/irq-mb93093.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c index e45209031873..4d4ad09d3c91 100644 --- a/arch/frv/kernel/irq-mb93093.c +++ b/arch/frv/kernel/irq-mb93093.c | |||
@@ -35,45 +35,44 @@ | |||
35 | /* | 35 | /* |
36 | * off-CPU FPGA PIC operations | 36 | * off-CPU FPGA PIC operations |
37 | */ | 37 | */ |
38 | static void frv_fpga_mask(unsigned int irq) | 38 | static void frv_fpga_mask(struct irq_data *d) |
39 | { | 39 | { |
40 | uint16_t imr = __get_IMR(); | 40 | uint16_t imr = __get_IMR(); |
41 | 41 | ||
42 | imr |= 1 << (irq - IRQ_BASE_FPGA); | 42 | imr |= 1 << (d->irq - IRQ_BASE_FPGA); |
43 | __set_IMR(imr); | 43 | __set_IMR(imr); |
44 | } | 44 | } |
45 | 45 | ||
46 | static void frv_fpga_ack(unsigned int irq) | 46 | static void frv_fpga_ack(struct irq_data *d) |
47 | { | 47 | { |
48 | __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); | 48 | __clr_IFR(1 << (d->irq - IRQ_BASE_FPGA)); |
49 | } | 49 | } |
50 | 50 | ||
51 | static void frv_fpga_mask_ack(unsigned int irq) | 51 | static void frv_fpga_mask_ack(struct irq_data *d) |
52 | { | 52 | { |
53 | uint16_t imr = __get_IMR(); | 53 | uint16_t imr = __get_IMR(); |
54 | 54 | ||
55 | imr |= 1 << (irq - IRQ_BASE_FPGA); | 55 | imr |= 1 << (d->irq - IRQ_BASE_FPGA); |
56 | __set_IMR(imr); | 56 | __set_IMR(imr); |
57 | 57 | ||
58 | __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); | 58 | __clr_IFR(1 << (d->irq - IRQ_BASE_FPGA)); |
59 | } | 59 | } |
60 | 60 | ||
61 | static void frv_fpga_unmask(unsigned int irq) | 61 | static void frv_fpga_unmask(struct irq_data *d) |
62 | { | 62 | { |
63 | uint16_t imr = __get_IMR(); | 63 | uint16_t imr = __get_IMR(); |
64 | 64 | ||
65 | imr &= ~(1 << (irq - IRQ_BASE_FPGA)); | 65 | imr &= ~(1 << (d->irq - IRQ_BASE_FPGA)); |
66 | 66 | ||
67 | __set_IMR(imr); | 67 | __set_IMR(imr); |
68 | } | 68 | } |
69 | 69 | ||
70 | static struct irq_chip frv_fpga_pic = { | 70 | static struct irq_chip frv_fpga_pic = { |
71 | .name = "mb93093", | 71 | .name = "mb93093", |
72 | .ack = frv_fpga_ack, | 72 | .irq_ack = frv_fpga_ack, |
73 | .mask = frv_fpga_mask, | 73 | .irq_mask = frv_fpga_mask, |
74 | .mask_ack = frv_fpga_mask_ack, | 74 | .irq_mask_ack = frv_fpga_mask_ack, |
75 | .unmask = frv_fpga_unmask, | 75 | .irq_unmask = frv_fpga_unmask, |
76 | .end = frv_fpga_end, | ||
77 | }; | 76 | }; |
78 | 77 | ||
79 | /* | 78 | /* |
@@ -94,7 +93,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask) | |||
94 | irq = 31 - irq; | 93 | irq = 31 - irq; |
95 | mask &= ~(1 << irq); | 94 | mask &= ~(1 << irq); |
96 | 95 | ||
97 | generic_irq_handle(IRQ_BASE_FPGA + irq); | 96 | generic_handle_irq(IRQ_BASE_FPGA + irq); |
98 | } | 97 | } |
99 | 98 | ||
100 | return IRQ_HANDLED; | 99 | return IRQ_HANDLED; |
@@ -125,7 +124,7 @@ void __init fpga_init(void) | |||
125 | __clr_IFR(0x0000); | 124 | __clr_IFR(0x0000); |
126 | 125 | ||
127 | for (irq = IRQ_BASE_FPGA + 8; irq <= IRQ_BASE_FPGA + 10; irq++) | 126 | for (irq = IRQ_BASE_FPGA + 8; irq <= IRQ_BASE_FPGA + 10; irq++) |
128 | set_irq_chip_and_handler(irq, &frv_fpga_pic, handle_edge_irq); | 127 | irq_set_chip_and_handler(irq, &frv_fpga_pic, handle_edge_irq); |
129 | 128 | ||
130 | /* the FPGA drives external IRQ input #2 on the CPU PIC */ | 129 | /* the FPGA drives external IRQ input #2 on the CPU PIC */ |
131 | setup_irq(IRQ_CPU_EXTERNAL2, &fpga_irq[0]); | 130 | setup_irq(IRQ_CPU_EXTERNAL2, &fpga_irq[0]); |