diff options
Diffstat (limited to 'arch/mips/sibyte/bcm1480/irq.c')
-rw-r--r-- | arch/mips/sibyte/bcm1480/irq.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index e729b5f30264..7aa79bf63c4a 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
@@ -289,7 +289,7 @@ int bcm1480_steal_irq(int irq) | |||
289 | if (irq >= BCM1480_NR_IRQS) | 289 | if (irq >= BCM1480_NR_IRQS) |
290 | return -EINVAL; | 290 | return -EINVAL; |
291 | 291 | ||
292 | spin_lock_irqsave(&desc->lock,flags); | 292 | spin_lock_irqsave(&desc->lock, flags); |
293 | /* Don't allow sharing at all for these */ | 293 | /* Don't allow sharing at all for these */ |
294 | if (desc->action != NULL) | 294 | if (desc->action != NULL) |
295 | retval = -EBUSY; | 295 | retval = -EBUSY; |
@@ -297,7 +297,7 @@ int bcm1480_steal_irq(int irq) | |||
297 | desc->action = &bcm1480_dummy_action; | 297 | desc->action = &bcm1480_dummy_action; |
298 | desc->depth = 0; | 298 | desc->depth = 0; |
299 | } | 299 | } |
300 | spin_unlock_irqrestore(&desc->lock,flags); | 300 | spin_unlock_irqrestore(&desc->lock, flags); |
301 | return 0; | 301 | return 0; |
302 | } | 302 | } |
303 | 303 | ||
@@ -431,8 +431,8 @@ void __init arch_init_irq(void) | |||
431 | 431 | ||
432 | #include <linux/delay.h> | 432 | #include <linux/delay.h> |
433 | 433 | ||
434 | #define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg))) | 434 | #define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port, reg))) |
435 | #define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg))) | 435 | #define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port, reg))) |
436 | 436 | ||
437 | static void bcm1480_kgdb_interrupt(void) | 437 | static void bcm1480_kgdb_interrupt(void) |
438 | { | 438 | { |
@@ -450,7 +450,6 @@ static void bcm1480_kgdb_interrupt(void) | |||
450 | 450 | ||
451 | #endif /* CONFIG_KGDB */ | 451 | #endif /* CONFIG_KGDB */ |
452 | 452 | ||
453 | extern void bcm1480_timer_interrupt(void); | ||
454 | extern void bcm1480_mailbox_interrupt(void); | 453 | extern void bcm1480_mailbox_interrupt(void); |
455 | 454 | ||
456 | asmlinkage void plat_irq_dispatch(void) | 455 | asmlinkage void plat_irq_dispatch(void) |
@@ -470,8 +469,16 @@ asmlinkage void plat_irq_dispatch(void) | |||
470 | else | 469 | else |
471 | #endif | 470 | #endif |
472 | 471 | ||
473 | if (pending & CAUSEF_IP4) | 472 | if (pending & CAUSEF_IP4) { |
474 | bcm1480_timer_interrupt(); | 473 | int cpu = smp_processor_id(); |
474 | int irq = K_BCM1480_INT_TIMER_0 + cpu; | ||
475 | |||
476 | /* Reset the timer */ | ||
477 | __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, | ||
478 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | ||
479 | |||
480 | do_IRQ(irq); | ||
481 | } | ||
475 | 482 | ||
476 | #ifdef CONFIG_SMP | 483 | #ifdef CONFIG_SMP |
477 | else if (pending & CAUSEF_IP3) | 484 | else if (pending & CAUSEF_IP3) |