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.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index cfeab669782f..d1ac7a25c856 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -22,8 +22,8 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24 24
25#include <asm/bootinfo.h>
26#include <asm/irq_cpu.h> 25#include <asm/irq_cpu.h>
26#include <asm/lasat/lasat.h>
27#include <asm/lasat/lasatint.h> 27#include <asm/lasat/lasatint.h>
28 28
29#include <irq.h> 29#include <irq.h>
@@ -34,11 +34,13 @@ static volatile int lasat_int_mask_shift;
34 34
35void disable_lasat_irq(unsigned int irq_nr) 35void disable_lasat_irq(unsigned int irq_nr)
36{ 36{
37 irq_nr -= LASAT_IRQ_BASE;
37 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift; 38 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift;
38} 39}
39 40
40void enable_lasat_irq(unsigned int irq_nr) 41void enable_lasat_irq(unsigned int irq_nr)
41{ 42{
43 irq_nr -= LASAT_IRQ_BASE;
42 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift; 44 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift;
43} 45}
44 46
@@ -110,23 +112,18 @@ void __init arch_init_irq(void)
110{ 112{
111 int i; 113 int i;
112 114
113 switch (mips_machtype) { 115 if (IS_LASAT_200()) {
114 case MACH_LASAT_100:
115 lasat_int_status = (void *)LASAT_INT_STATUS_REG_100;
116 lasat_int_mask = (void *)LASAT_INT_MASK_REG_100;
117 lasat_int_mask_shift = LASATINT_MASK_SHIFT_100;
118 get_int_status = get_int_status_100;
119 *lasat_int_mask = 0;
120 break;
121 case MACH_LASAT_200:
122 lasat_int_status = (void *)LASAT_INT_STATUS_REG_200; 116 lasat_int_status = (void *)LASAT_INT_STATUS_REG_200;
123 lasat_int_mask = (void *)LASAT_INT_MASK_REG_200; 117 lasat_int_mask = (void *)LASAT_INT_MASK_REG_200;
124 lasat_int_mask_shift = LASATINT_MASK_SHIFT_200; 118 lasat_int_mask_shift = LASATINT_MASK_SHIFT_200;
125 get_int_status = get_int_status_200; 119 get_int_status = get_int_status_200;
126 *lasat_int_mask &= 0xffff; 120 *lasat_int_mask &= 0xffff;
127 break; 121 } else {
128 default: 122 lasat_int_status = (void *)LASAT_INT_STATUS_REG_100;
129 panic("arch_init_irq: mips_machtype incorrect"); 123 lasat_int_mask = (void *)LASAT_INT_MASK_REG_100;
124 lasat_int_mask_shift = LASATINT_MASK_SHIFT_100;
125 get_int_status = get_int_status_100;
126 *lasat_int_mask = 0;
130 } 127 }
131 128
132 mips_cpu_irq_init(); 129 mips_cpu_irq_init();