diff options
Diffstat (limited to 'arch/mips/jmr3927/rbhma3100/irq.c')
-rw-r--r-- | arch/mips/jmr3927/rbhma3100/irq.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c index de4a238c28be..3da49c5aaf49 100644 --- a/arch/mips/jmr3927/rbhma3100/irq.c +++ b/arch/mips/jmr3927/rbhma3100/irq.c | |||
@@ -90,17 +90,6 @@ static unsigned char irc_level[TX3927_NUM_IR] = { | |||
90 | static void jmr3927_irq_disable(unsigned int irq_nr); | 90 | static void jmr3927_irq_disable(unsigned int irq_nr); |
91 | static void jmr3927_irq_enable(unsigned int irq_nr); | 91 | static void jmr3927_irq_enable(unsigned int irq_nr); |
92 | 92 | ||
93 | static DEFINE_SPINLOCK(jmr3927_irq_lock); | ||
94 | |||
95 | static unsigned int jmr3927_irq_startup(unsigned int irq) | ||
96 | { | ||
97 | jmr3927_irq_enable(irq); | ||
98 | |||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | #define jmr3927_irq_shutdown jmr3927_irq_disable | ||
103 | |||
104 | static void jmr3927_irq_ack(unsigned int irq) | 93 | static void jmr3927_irq_ack(unsigned int irq) |
105 | { | 94 | { |
106 | if (irq == JMR3927_IRQ_IRC_TMR0) | 95 | if (irq == JMR3927_IRQ_IRC_TMR0) |
@@ -118,9 +107,7 @@ static void jmr3927_irq_end(unsigned int irq) | |||
118 | static void jmr3927_irq_disable(unsigned int irq_nr) | 107 | static void jmr3927_irq_disable(unsigned int irq_nr) |
119 | { | 108 | { |
120 | struct tb_irq_space* sp; | 109 | struct tb_irq_space* sp; |
121 | unsigned long flags; | ||
122 | 110 | ||
123 | spin_lock_irqsave(&jmr3927_irq_lock, flags); | ||
124 | for (sp = tb_irq_spaces; sp; sp = sp->next) { | 111 | for (sp = tb_irq_spaces; sp; sp = sp->next) { |
125 | if (sp->start_irqno <= irq_nr && | 112 | if (sp->start_irqno <= irq_nr && |
126 | irq_nr < sp->start_irqno + sp->nr_irqs) { | 113 | irq_nr < sp->start_irqno + sp->nr_irqs) { |
@@ -130,15 +117,12 @@ static void jmr3927_irq_disable(unsigned int irq_nr) | |||
130 | break; | 117 | break; |
131 | } | 118 | } |
132 | } | 119 | } |
133 | spin_unlock_irqrestore(&jmr3927_irq_lock, flags); | ||
134 | } | 120 | } |
135 | 121 | ||
136 | static void jmr3927_irq_enable(unsigned int irq_nr) | 122 | static void jmr3927_irq_enable(unsigned int irq_nr) |
137 | { | 123 | { |
138 | struct tb_irq_space* sp; | 124 | struct tb_irq_space* sp; |
139 | unsigned long flags; | ||
140 | 125 | ||
141 | spin_lock_irqsave(&jmr3927_irq_lock, flags); | ||
142 | for (sp = tb_irq_spaces; sp; sp = sp->next) { | 126 | for (sp = tb_irq_spaces; sp; sp = sp->next) { |
143 | if (sp->start_irqno <= irq_nr && | 127 | if (sp->start_irqno <= irq_nr && |
144 | irq_nr < sp->start_irqno + sp->nr_irqs) { | 128 | irq_nr < sp->start_irqno + sp->nr_irqs) { |
@@ -148,7 +132,6 @@ static void jmr3927_irq_enable(unsigned int irq_nr) | |||
148 | break; | 132 | break; |
149 | } | 133 | } |
150 | } | 134 | } |
151 | spin_unlock_irqrestore(&jmr3927_irq_lock, flags); | ||
152 | } | 135 | } |
153 | 136 | ||
154 | /* | 137 | /* |
@@ -457,11 +440,10 @@ void __init arch_init_irq(void) | |||
457 | 440 | ||
458 | static struct irq_chip jmr3927_irq_controller = { | 441 | static struct irq_chip jmr3927_irq_controller = { |
459 | .typename = "jmr3927_irq", | 442 | .typename = "jmr3927_irq", |
460 | .startup = jmr3927_irq_startup, | ||
461 | .shutdown = jmr3927_irq_shutdown, | ||
462 | .enable = jmr3927_irq_enable, | ||
463 | .disable = jmr3927_irq_disable, | ||
464 | .ack = jmr3927_irq_ack, | 443 | .ack = jmr3927_irq_ack, |
444 | .mask = jmr3927_irq_disable, | ||
445 | .mask_ack = jmr3927_irq_ack, | ||
446 | .unmask = jmr3927_irq_enable, | ||
465 | .end = jmr3927_irq_end, | 447 | .end = jmr3927_irq_end, |
466 | }; | 448 | }; |
467 | 449 | ||
@@ -469,12 +451,8 @@ void jmr3927_irq_init(u32 irq_base) | |||
469 | { | 451 | { |
470 | u32 i; | 452 | u32 i; |
471 | 453 | ||
472 | for (i= irq_base; i< irq_base + JMR3927_NR_IRQ_IRC + JMR3927_NR_IRQ_IOC; i++) { | 454 | for (i= irq_base; i< irq_base + JMR3927_NR_IRQ_IRC + JMR3927_NR_IRQ_IOC; i++) |
473 | irq_desc[i].status = IRQ_DISABLED; | 455 | set_irq_chip(i, &jmr3927_irq_controller); |
474 | irq_desc[i].action = NULL; | ||
475 | irq_desc[i].depth = 1; | ||
476 | irq_desc[i].chip = &jmr3927_irq_controller; | ||
477 | } | ||
478 | 456 | ||
479 | jmr3927_irq_base = irq_base; | 457 | jmr3927_irq_base = irq_base; |
480 | } | 458 | } |