
From: Paul Mundt <lethal@Linux-SH.ORG>

TMU0 initialization was broken when the timer was already started by someone
else (for instance, a boot loader).  This fixes it.

Signed-off-by: Andy Sturges <andy.sturges@st.com>
Signed-off-by: Richard Curnow <rc@rc0.org.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/sh64/kernel/time.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN arch/sh64/kernel/time.c~sh64-tmu-init-bugfix arch/sh64/kernel/time.c
--- 25/arch/sh64/kernel/time.c~sh64-tmu-init-bugfix	2005-03-07 20:41:27.000000000 -0800
+++ 25-akpm/arch/sh64/kernel/time.c	2005-03-07 21:14:50.000000000 -0800
@@ -45,6 +45,7 @@
 #define TMU_TOCR_INIT	0x00
 #define TMU0_TCR_INIT	0x0020
 #define TMU_TSTR_INIT	1
+#define TMU_TSTR_OFF	0
 
 /* RCR1 Bits */
 #define RCR1_CF		0x80	/* Carry Flag             */
@@ -561,6 +562,7 @@ void __init time_init(void)
 	current_cpu_data.module_clock = module_clock;
 
 	/* Start TMU0 */
+	ctrl_outb(TMU_TSTR_OFF, TMU_TSTR);
 	ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
 	ctrl_outw(TMU0_TCR_INIT, TMU0_TCR);
 	ctrl_outl(interval, TMU0_TCOR);
_
