clocksource: sh_tmu: Make undefined TCOR behaviour less undefined.
authorShin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Sun, 21 Jun 2009 10:56:22 +0000 (10:56 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 24 Jun 2009 12:08:11 +0000 (21:08 +0900)
Avoid undocumented vague TMU behavior when zero value is set to TCOR.

This primarily fixes up issues encountered under qemu with a zero-length
period, while the hardware itself is fairly ambivalent one way or the
other.

Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Acked-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/clocksource/sh_tmu.c

index 9ffb05f4095d7598c6b8fc8e37bc55cae96ae2b6..93c2322feab79e8e119d0b51949ac0b1bc42135d 100644 (file)
@@ -161,7 +161,7 @@ static void sh_tmu_set_next(struct sh_tmu_priv *p, unsigned long delta,
        if (periodic)
                sh_tmu_write(p, TCOR, delta);
        else
-               sh_tmu_write(p, TCOR, 0);
+               sh_tmu_write(p, TCOR, 0xffffffff);
 
        sh_tmu_write(p, TCNT, delta);