diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-11-11 12:33:55 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-11-15 18:21:50 -0500 |
commit | 8dfa741f146b39eb59ef2094e03f47079ca99eb0 (patch) | |
tree | 823c790dff8619a3671c1a8a19671e020b9b4e2d /arch/mips/kernel/cevt-bcm1480.c | |
parent | 622477533d3dc24845c847f386533f3c0e6a1be6 (diff) |
[MIPS] Sibyte: Stop timers before programming next even.
We have no guarantee by the generic time code that the timer is stopped
when the ->next_event method is called. Modifying the Timer Initial Count
register while the timer is enabled has UNPREDICTABLE effect according to
the BCM1250/BCM1125/BCM1125H User Manual. So stop the timer before
reprogramming.
This is a paranoia fix; no ill effects have been observed previously.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/cevt-bcm1480.c')
-rw-r--r-- | arch/mips/kernel/cevt-bcm1480.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c index e54410e5a2cd..0a57f86945f1 100644 --- a/arch/mips/kernel/cevt-bcm1480.c +++ b/arch/mips/kernel/cevt-bcm1480.c | |||
@@ -75,6 +75,7 @@ static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd) | |||
75 | cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); | 75 | cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); |
76 | init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); | 76 | init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); |
77 | 77 | ||
78 | __raw_writeq(0, cfg); | ||
78 | __raw_writeq(delta - 1, init); | 79 | __raw_writeq(delta - 1, init); |
79 | __raw_writeq(M_SCD_TIMER_ENABLE, cfg); | 80 | __raw_writeq(M_SCD_TIMER_ENABLE, cfg); |
80 | 81 | ||