aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/jmr3927/rbhma3100/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/jmr3927/rbhma3100/irq.c')
-rw-r--r--arch/mips/jmr3927/rbhma3100/irq.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 39a0243bed9..3da49c5aaf4 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] = {
90static void jmr3927_irq_disable(unsigned int irq_nr); 90static void jmr3927_irq_disable(unsigned int irq_nr);
91static void jmr3927_irq_enable(unsigned int irq_nr); 91static void jmr3927_irq_enable(unsigned int irq_nr);
92 92
93static DEFINE_SPINLOCK(jmr3927_irq_lock);
94
95static 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
104static void jmr3927_irq_ack(unsigned int irq) 93static 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)
118static void jmr3927_irq_disable(unsigned int irq_nr) 107static 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
136static void jmr3927_irq_enable(unsigned int irq_nr) 122static 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/*
@@ -288,6 +271,8 @@ static void tx_branch_likely_bug_fixup(void)
288 271
289static void jmr3927_spurious(void) 272static void jmr3927_spurious(void)
290{ 273{
274 struct pt_regs * regs = get_irq_regs();
275
291#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND 276#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
292 tx_branch_likely_bug_fixup(); 277 tx_branch_likely_bug_fixup();
293#endif 278#endif
@@ -297,6 +282,7 @@ static void jmr3927_spurious(void)
297 282
298asmlinkage void plat_irq_dispatch(void) 283asmlinkage void plat_irq_dispatch(void)
299{ 284{
285 struct pt_regs * regs = get_irq_regs();
300 int irq; 286 int irq;
301 287
302#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND 288#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
@@ -454,11 +440,10 @@ void __init arch_init_irq(void)
454 440
455static struct irq_chip jmr3927_irq_controller = { 441static struct irq_chip jmr3927_irq_controller = {
456 .typename = "jmr3927_irq", 442 .typename = "jmr3927_irq",
457 .startup = jmr3927_irq_startup,
458 .shutdown = jmr3927_irq_shutdown,
459 .enable = jmr3927_irq_enable,
460 .disable = jmr3927_irq_disable,
461 .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,
462 .end = jmr3927_irq_end, 447 .end = jmr3927_irq_end,
463}; 448};
464 449
@@ -466,12 +451,8 @@ void jmr3927_irq_init(u32 irq_base)
466{ 451{
467 u32 i; 452 u32 i;
468 453
469 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++)
470 irq_desc[i].status = IRQ_DISABLED; 455 set_irq_chip(i, &jmr3927_irq_controller);
471 irq_desc[i].action = NULL;
472 irq_desc[i].depth = 1;
473 irq_desc[i].chip = &jmr3927_irq_controller;
474 }
475 456
476 jmr3927_irq_base = irq_base; 457 jmr3927_irq_base = irq_base;
477} 458}