clocksource: sh_tmu: Make undefined TCOR behaviour less undefined.

Previous thread: mtd: nand: fix build failure and incorrect return from omap_wait() by Linux Kernel Mailing List on Wednesday, July 1, 2009 - 11:59 am. (1 message)

Next thread: sh: make set_perf_counter_pending() static inline. by Linux Kernel Mailing List on Thursday, July 2, 2009 - 12:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, July 2, 2009 - 12:59 pm

Gitweb:     http://git.kernel.org/linus/6f4b67b8ff707147e14ee71045ab25aa286520f2
Commit:     6f4b67b8ff707147e14ee71045ab25aa286520f2
Parent:     4e8a2372f9255a1464ef488ed925455f53fbdaa1
Author:     Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
AuthorDate: Sun Jun 21 10:56:22 2009 +0000
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Wed Jun 24 21:08:11 2009 +0900

    clocksource: sh_tmu: Make undefined TCOR behaviour less undefined.
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 9ffb05f..93c2322 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -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);
 
--

Previous thread: mtd: nand: fix build failure and incorrect return from omap_wait() by Linux Kernel Mailing List on Wednesday, July 1, 2009 - 11:59 am. (1 message)

Next thread: sh: make set_perf_counter_pending() static inline. by Linux Kernel Mailing List on Thursday, July 2, 2009 - 12:59 pm. (1 message)