Skip to content

Commit

Permalink
[MIPS] Sibyte: Fix interrupt timer off by one bug.
Browse files Browse the repository at this point in the history
    
From Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>:
    
The timers need to be loaded with 1 less than the desired interval not
the interval itself.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
ralfbaechle committed Mar 18, 2006
1 parent a77f124 commit 4308cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/sibyte/sb1250/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ void sb1250_time_init(void)
/* Disable the timer and set up the count */
__raw_writeq(0, IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)));
#ifdef CONFIG_SIMULATION
__raw_writeq(50000 / HZ,
__raw_writeq((50000 / HZ) - 1,
IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)));
#else
__raw_writeq(1000000 / HZ,
__raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1,
IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)));
#endif

Expand Down

0 comments on commit 4308cb1

Please sign in to comment.