Skip to content

Commit 86794b4

Browse files
soniczaet00
authored andcommitted
blackfin: SEC: clean up SEC interrupt initialization
Append the SEC IRQ after the IVG6, which is consistent to BF5xx SIC. Exclude SIC irqchip fucntions from SEC code. Call handle_fasteoi_irq in SEC error and fault handler. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
1 parent 1439d03 commit 86794b4

File tree

4 files changed

+137
-146
lines changed

4 files changed

+137
-146
lines changed

arch/blackfin/include/mach-common/irq.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
#define IRQ_HWERR 5 /* Hardware Error */
4141
#define IRQ_CORETMR 6 /* Core timer */
4242

43-
#define BFIN_IRQ(x) ((x) + 7)
44-
4543
#define IVG7 7
4644
#define IVG8 8
4745
#define IVG9 9
@@ -52,6 +50,9 @@
5250
#define IVG14 14
5351
#define IVG15 15
5452

53+
#define BFIN_IRQ(x) ((x) + IVG7)
54+
#define BFIN_SYSIRQ(x) ((x) - IVG7)
55+
5556
#define NR_IRQS (NR_MACH_IRQS + NR_SPARE_IRQS)
5657

5758
#endif

arch/blackfin/mach-bf609/include/mach/irq.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
#include <mach-common/irq.h>
1111

12-
#undef BFIN_IRQ
13-
#define BFIN_IRQ(x) ((x) + IVG15)
14-
1512
#define NR_PERI_INTS (5 * 32)
1613

1714
#define IRQ_SEC_ERR BFIN_IRQ(0) /* SEC Error */

arch/blackfin/mach-bf609/pm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ void bfin_hibernate_syscontrol(void)
174174
bfin_write32(DPM0_RESTORE5, bfin_read32(DPM0_RESTORE5) | 4);
175175
}
176176

177-
#define IRQ_SID(irq) ((irq) - IVG15)
178177
asmlinkage void enter_deepsleep(void);
179178

180179
__attribute__((l1_text))
@@ -311,7 +310,7 @@ static irqreturn_t test_isr(int irq, void *dev_id)
311310
{
312311
printk(KERN_DEBUG "gpio irq %d\n", irq);
313312
if (irq == 231)
314-
bfin_sec_raise_irq(IRQ_SID(IRQ_SOFT1));
313+
bfin_sec_raise_irq(BFIN_SYSIRQ(IRQ_SOFT1));
315314
return IRQ_HANDLED;
316315
}
317316

0 commit comments

Comments
 (0)