mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[MIPS] Sibyte: Fix interrupt timer off by one bug.
From Dave Johnson <[email protected]>: The timers need to be loaded with 1 less than the desired interval not the interval itself. Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
parent
a77f124294
commit
4308cb1628
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue