Skip to content

Commit

Permalink
sh: turn off irqs when disabling CMT/TMU timers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and pmundt committed Jun 17, 2009
1 parent 4c7eb4e commit be890a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/clocksource/sh_cmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
/* disable channel */
sh_cmt_start_stop_ch(p, 0);

/* disable interrupts in CMT block */
sh_cmt_write(p, CMCSR, 0);

/* stop clock */
clk_disable(p->clk);
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/clocksource/sh_tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ static void sh_tmu_disable(struct sh_tmu_priv *p)
/* disable channel */
sh_tmu_start_stop_ch(p, 0);

/* disable interrupts in TMU block */
sh_tmu_write(p, TCR, 0x0000);

/* stop clock */
clk_disable(p->clk);
}
Expand Down

0 comments on commit be890a1

Please sign in to comment.