aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/sh_cmt.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-06-17 01:04:04 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-17 02:39:56 -0400
commitbe890a1a95fb439594e796f1968f86ee9f36e718 (patch)
tree89a1107bfae107e43f544fb2041ca13a92b946b5 /drivers/clocksource/sh_cmt.c
parent4c7eb4ebc9001ce343969f58fa538e164e82000b (diff)
sh: turn off irqs when disabling CMT/TMU timers
Modify the CMT and TMU drivers to disable interrupts when disabling the timer. Only using start/stop bits is not enough. This fixes a bootup hang on Migo-R when the CMT is replaced by TMU for clockevents but the CMT keeps on delivering irqs even though the timer start bit is off. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/clocksource/sh_cmt.c')
-rw-r--r--drivers/clocksource/sh_cmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 7135f50082d6..2964f5f4a7ef 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -184,6 +184,9 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
184 /* disable channel */ 184 /* disable channel */
185 sh_cmt_start_stop_ch(p, 0); 185 sh_cmt_start_stop_ch(p, 0);
186 186
187 /* disable interrupts in CMT block */
188 sh_cmt_write(p, CMCSR, 0);
189
187 /* stop clock */ 190 /* stop clock */
188 clk_disable(p->clk); 191 clk_disable(p->clk);
189} 192}