Commit 73f7d2c5 authored by Paul Mundt's avatar Paul Mundt Committed by Linus Torvalds

[PATCH] sh64: TMU init bugfix

TMU0 initialization was broken when the timer was already started by someone
else (for instance, a boot loader).  This fixes it.
Signed-off-by: default avatarAndy Sturges <andy.sturges@st.com>
Signed-off-by: default avatarRichard Curnow <rc@rc0.org.uk>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7aaa84d6
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#define TMU_TOCR_INIT 0x00 #define TMU_TOCR_INIT 0x00
#define TMU0_TCR_INIT 0x0020 #define TMU0_TCR_INIT 0x0020
#define TMU_TSTR_INIT 1 #define TMU_TSTR_INIT 1
#define TMU_TSTR_OFF 0
/* RCR1 Bits */ /* RCR1 Bits */
#define RCR1_CF 0x80 /* Carry Flag */ #define RCR1_CF 0x80 /* Carry Flag */
...@@ -561,6 +562,7 @@ void __init time_init(void) ...@@ -561,6 +562,7 @@ void __init time_init(void)
current_cpu_data.module_clock = module_clock; current_cpu_data.module_clock = module_clock;
/* Start TMU0 */ /* Start TMU0 */
ctrl_outb(TMU_TSTR_OFF, TMU_TSTR);
ctrl_outb(TMU_TOCR_INIT, TMU_TOCR); ctrl_outb(TMU_TOCR_INIT, TMU_TOCR);
ctrl_outw(TMU0_TCR_INIT, TMU0_TCR); ctrl_outw(TMU0_TCR_INIT, TMU0_TCR);
ctrl_outl(interval, TMU0_TCOR); ctrl_outl(interval, TMU0_TCOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment