Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242434
b: refs/heads/master
c: 3b042d0
h: refs/heads/master
v: v3
  • Loading branch information
Anoop P A authored and Ralf Baechle committed Mar 25, 2011
1 parent 9a1d146 commit cb44eb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1685f3b158a244d4f6e205e67c84483fffcb2d9f
refs/heads/master: 3b042d0830463056a669a12362c940a94f7e3cd7
16 changes: 15 additions & 1 deletion trunk/arch/mips/pmc-sierra/msp71xx/msp_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,20 @@
#include <linux/module.h>
#include <linux/ptrace.h>

#include <asm/cevt-r4k.h>
#include <asm/mipsregs.h>
#include <asm/time.h>

#include <msp_prom.h>
#include <msp_int.h>
#include <msp_regs.h>

#define get_current_vpe() \
((read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE)

static struct irqaction timer_vpe1;
static int tim_installed;

void __init plat_time_init(void)
{
char *endp, *s;
Expand Down Expand Up @@ -83,5 +90,12 @@ void __init plat_time_init(void)

unsigned int __cpuinit get_c0_compare_int(void)
{
return MSP_INT_VPE0_TIMER;
/* MIPS_MT modes may want timer for second VPE */
if ((get_current_vpe()) && !tim_installed) {
memcpy(&timer_vpe1, &c0_compare_irqaction, sizeof(timer_vpe1));
setup_irq(MSP_INT_VPE1_TIMER, &timer_vpe1);
tim_installed++;
}

return get_current_vpe() ? MSP_INT_VPE1_TIMER : MSP_INT_VPE0_TIMER;
}

0 comments on commit cb44eb2

Please sign in to comment.