aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sibyte/bcm1480
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/sibyte/bcm1480')
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c28
-rw-r--r--arch/mips/sibyte/bcm1480/smp.c2
-rw-r--r--arch/mips/sibyte/bcm1480/time.c9
3 files changed, 18 insertions, 21 deletions
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index a46b75b23ecb..8b1f41484923 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -25,9 +25,9 @@
25#include <linux/kernel_stat.h> 25#include <linux/kernel_stat.h>
26 26
27#include <asm/errno.h> 27#include <asm/errno.h>
28#include <asm/irq_regs.h>
28#include <asm/signal.h> 29#include <asm/signal.h>
29#include <asm/system.h> 30#include <asm/system.h>
30#include <asm/ptrace.h>
31#include <asm/io.h> 31#include <asm/io.h>
32 32
33#include <asm/sibyte/bcm1480_regs.h> 33#include <asm/sibyte/bcm1480_regs.h>
@@ -284,8 +284,7 @@ void __init init_bcm1480_irqs(void)
284} 284}
285 285
286 286
287static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id, 287static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id)
288 struct pt_regs *regs)
289{ 288{
290 return IRQ_NONE; 289 return IRQ_NONE;
291} 290}
@@ -453,7 +452,7 @@ void __init arch_init_irq(void)
453#define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg))) 452#define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg)))
454#define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg))) 453#define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg)))
455 454
456void bcm1480_kgdb_interrupt(struct pt_regs *regs) 455static void bcm1480_kgdb_interrupt(void)
457{ 456{
458 /* 457 /*
459 * Clear break-change status (allow some time for the remote 458 * Clear break-change status (allow some time for the remote
@@ -464,16 +463,15 @@ void bcm1480_kgdb_interrupt(struct pt_regs *regs)
464 mdelay(500); 463 mdelay(500);
465 duart_out(R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT | 464 duart_out(R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT |
466 M_DUART_RX_EN | M_DUART_TX_EN); 465 M_DUART_RX_EN | M_DUART_TX_EN);
467 set_async_breakpoint(&regs->cp0_epc); 466 set_async_breakpoint(&get_irq_regs()->cp0_epc);
468} 467}
469 468
470#endif /* CONFIG_KGDB */ 469#endif /* CONFIG_KGDB */
471 470
472extern void bcm1480_timer_interrupt(struct pt_regs *regs); 471extern void bcm1480_timer_interrupt(void);
473extern void bcm1480_mailbox_interrupt(struct pt_regs *regs); 472extern void bcm1480_mailbox_interrupt(void);
474extern void bcm1480_kgdb_interrupt(struct pt_regs *regs);
475 473
476asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 474asmlinkage void plat_irq_dispatch(void)
477{ 475{
478 unsigned int pending; 476 unsigned int pending;
479 477
@@ -486,21 +484,21 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
486 484
487#ifdef CONFIG_SIBYTE_BCM1480_PROF 485#ifdef CONFIG_SIBYTE_BCM1480_PROF
488 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ 486 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
489 sbprof_cpu_intr(exception_epc(regs)); 487 sbprof_cpu_intr();
490 else 488 else
491#endif 489#endif
492 490
493 if (pending & CAUSEF_IP4) 491 if (pending & CAUSEF_IP4)
494 bcm1480_timer_interrupt(regs); 492 bcm1480_timer_interrupt();
495 493
496#ifdef CONFIG_SMP 494#ifdef CONFIG_SMP
497 else if (pending & CAUSEF_IP3) 495 else if (pending & CAUSEF_IP3)
498 bcm1480_mailbox_interrupt(regs); 496 bcm1480_mailbox_interrupt();
499#endif 497#endif
500 498
501#ifdef CONFIG_KGDB 499#ifdef CONFIG_KGDB
502 else if (pending & CAUSEF_IP6) 500 else if (pending & CAUSEF_IP6)
503 bcm1480_kgdb_interrupt(regs); /* KGDB (uart 1) */ 501 bcm1480_kgdb_interrupt(); /* KGDB (uart 1) */
504#endif 502#endif
505 503
506 else if (pending & CAUSEF_IP2) { 504 else if (pending & CAUSEF_IP2) {
@@ -521,9 +519,9 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
521 519
522 if (mask_h) { 520 if (mask_h) {
523 if (mask_h ^ 1) 521 if (mask_h ^ 1)
524 do_IRQ(fls64(mask_h) - 1, regs); 522 do_IRQ(fls64(mask_h) - 1);
525 else 523 else
526 do_IRQ(63 + fls64(mask_l), regs); 524 do_IRQ(63 + fls64(mask_l));
527 } 525 }
528 } 526 }
529} 527}
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c
index 584a4b33faac..6eac36d1b8c8 100644
--- a/arch/mips/sibyte/bcm1480/smp.c
+++ b/arch/mips/sibyte/bcm1480/smp.c
@@ -88,7 +88,7 @@ void core_send_ipi(int cpu, unsigned int action)
88 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]); 88 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]);
89} 89}
90 90
91void bcm1480_mailbox_interrupt(struct pt_regs *regs) 91void bcm1480_mailbox_interrupt(void)
92{ 92{
93 int cpu = smp_processor_id(); 93 int cpu = smp_processor_id();
94 unsigned int action; 94 unsigned int action;
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c
index 7e088f6c4a86..bf12af46132e 100644
--- a/arch/mips/sibyte/bcm1480/time.c
+++ b/arch/mips/sibyte/bcm1480/time.c
@@ -31,7 +31,6 @@
31#include <linux/kernel_stat.h> 31#include <linux/kernel_stat.h>
32 32
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/ptrace.h>
35#include <asm/addrspace.h> 34#include <asm/addrspace.h>
36#include <asm/time.h> 35#include <asm/time.h>
37#include <asm/io.h> 36#include <asm/io.h>
@@ -100,10 +99,10 @@ void bcm1480_time_init(void)
100 99
101#include <asm/sibyte/sb1250.h> 100#include <asm/sibyte/sb1250.h>
102 101
103void bcm1480_timer_interrupt(struct pt_regs *regs) 102void bcm1480_timer_interrupt(void)
104{ 103{
105 int cpu = smp_processor_id(); 104 int cpu = smp_processor_id();
106 int irq = K_BCM1480_INT_TIMER_0+cpu; 105 int irq = K_BCM1480_INT_TIMER_0 + cpu;
107 106
108 /* Reset the timer */ 107 /* Reset the timer */
109 __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, 108 __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS,
@@ -113,13 +112,13 @@ void bcm1480_timer_interrupt(struct pt_regs *regs)
113 /* 112 /*
114 * CPU 0 handles the global timer interrupt job 113 * CPU 0 handles the global timer interrupt job
115 */ 114 */
116 ll_timer_interrupt(irq, regs); 115 ll_timer_interrupt(irq);
117 } 116 }
118 else { 117 else {
119 /* 118 /*
120 * other CPUs should just do profiling and process accounting 119 * other CPUs should just do profiling and process accounting
121 */ 120 */
122 ll_local_timer_interrupt(irq, regs); 121 ll_local_timer_interrupt(irq);
123 } 122 }
124} 123}
125 124