aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lasat/interrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lasat/interrupt.c')
-rw-r--r--arch/mips/lasat/interrupt.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index a144a002dcc4..2affa5ff171c 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -36,47 +36,20 @@ static volatile int lasat_int_mask_shift;
36 36
37void disable_lasat_irq(unsigned int irq_nr) 37void disable_lasat_irq(unsigned int irq_nr)
38{ 38{
39 unsigned long flags;
40
41 local_irq_save(flags);
42 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift; 39 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift;
43 local_irq_restore(flags);
44} 40}
45 41
46void enable_lasat_irq(unsigned int irq_nr) 42void enable_lasat_irq(unsigned int irq_nr)
47{ 43{
48 unsigned long flags;
49
50 local_irq_save(flags);
51 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift; 44 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift;
52 local_irq_restore(flags);
53}
54
55static unsigned int startup_lasat_irq(unsigned int irq)
56{
57 enable_lasat_irq(irq);
58
59 return 0; /* never anything pending */
60}
61
62#define shutdown_lasat_irq disable_lasat_irq
63
64#define mask_and_ack_lasat_irq disable_lasat_irq
65
66static void end_lasat_irq(unsigned int irq)
67{
68 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
69 enable_lasat_irq(irq);
70} 45}
71 46
72static struct irq_chip lasat_irq_type = { 47static struct irq_chip lasat_irq_type = {
73 .typename = "Lasat", 48 .typename = "Lasat",
74 .startup = startup_lasat_irq, 49 .ack = disable_lasat_irq,
75 .shutdown = shutdown_lasat_irq, 50 .mask = disable_lasat_irq,
76 .enable = enable_lasat_irq, 51 .mask_ack = disable_lasat_irq,
77 .disable = disable_lasat_irq, 52 .unmask = enable_lasat_irq,
78 .ack = mask_and_ack_lasat_irq,
79 .end = end_lasat_irq,
80}; 53};
81 54
82static inline int ls1bit32(unsigned int x) 55static inline int ls1bit32(unsigned int x)
@@ -152,10 +125,6 @@ void __init arch_init_irq(void)
152 panic("arch_init_irq: mips_machtype incorrect"); 125 panic("arch_init_irq: mips_machtype incorrect");
153 } 126 }
154 127
155 for (i = 0; i <= LASATINT_END; i++) { 128 for (i = 0; i <= LASATINT_END; i++)
156 irq_desc[i].status = IRQ_DISABLED; 129 set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq);
157 irq_desc[i].action = 0;
158 irq_desc[i].depth = 1;
159 irq_desc[i].chip = &lasat_irq_type;
160 }
161} 130}