aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/kernel/irq-mb93493.c
diff options
context:
space:
mode:
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 8ad9abfc7c13..39c0188a3498 100644
--- a/arch/frv/kernel/irq-mb93493.c
+++ b/arch/frv/kernel/irq-mb93493.c
@@ -43,8 +43,9 @@
43 43
44/* 44/*
45 * daughter board PIC operations 45 * daughter board PIC operations
46 * - there is no way to ACK interrupts in the MB93493 chip
46 */ 47 */
47static void frv_mb93493_enable(unsigned int irq) 48static void frv_mb93493_mask(unsigned int irq)
48{ 49{
49 uint32_t iqsr; 50 uint32_t iqsr;
50 volatile void *piqsr; 51 volatile void *piqsr;
@@ -55,11 +56,15 @@ static void frv_mb93493_enable(unsigned int irq)
55 piqsr = __addr_MB93493_IQSR(0); 56 piqsr = __addr_MB93493_IQSR(0);
56 57
57 iqsr = readl(piqsr); 58 iqsr = readl(piqsr);
58 iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16); 59 iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16));
59 writel(iqsr, piqsr); 60 writel(iqsr, piqsr);
60} 61}
61 62
62static void frv_mb93493_disable(unsigned int irq) 63static void frv_mb93493_ack(unsigned int irq)
64{
65}
66
67static void frv_mb93493_unmask(unsigned int irq)
63{ 68{
64 uint32_t iqsr; 69 uint32_t iqsr;
65 volatile void *piqsr; 70 volatile void *piqsr;
@@ -70,26 +75,16 @@ static void frv_mb93493_disable(unsigned int irq)
70 piqsr = __addr_MB93493_IQSR(0); 75 piqsr = __addr_MB93493_IQSR(0);
71 76
72 iqsr = readl(piqsr); 77 iqsr = readl(piqsr);
73 iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16)); 78 iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16);
74 writel(iqsr, piqsr); 79 writel(iqsr, piqsr);
75} 80}
76 81
77static void frv_mb93493_ack(unsigned int irq)
78{
79}
80
81static void frv_mb93493_end(unsigned int irq)
82{
83}
84
85static struct irq_chip frv_mb93493_pic = { 82static struct irq_chip frv_mb93493_pic = {
86 .name = "mb93093", 83 .name = "mb93093",
87 .enable = frv_mb93493_enable,
88 .disable = frv_mb93493_disable,
89 .ack = frv_mb93493_ack, 84 .ack = frv_mb93493_ack,
90 .mask = frv_mb93493_disable, 85 .mask = frv_mb93493_mask,
91 .unmask = frv_mb93493_enable, 86 .mask_ack = frv_mb93493_mask,
92 .end = frv_mb93493_end, 87 .unmask = frv_mb93493_unmask,
93}; 88};
94 89
95/* 90/*
@@ -98,7 +93,6 @@ static struct irq_chip frv_mb93493_pic = {
98static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs) 93static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs)
99{ 94{
100 volatile void *piqsr = _piqsr; 95 volatile void *piqsr = _piqsr;
101 irqreturn_t iret = 0;
102 uint32_t iqsr; 96 uint32_t iqsr;
103 97
104 iqsr = readl(piqsr); 98 iqsr = readl(piqsr);
@@ -112,11 +106,10 @@ static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs
112 irq = 31 - irq; 106 irq = 31 - irq;
113 iqsr &= ~(1 << irq); 107 iqsr &= ~(1 << irq);
114 108
115 if (__do_IRQ(IRQ_BASE_MB93493 + irq, regs)) 109 generic_handle_irq(IRQ_BASE_MB93493 + irq, regs);
116 iret |= IRQ_HANDLED;
117 } 110 }
118 111
119 return iret; 112 return IRQ_HANDLED;
120} 113}
121 114
122/* 115/*