Commit be890a1a authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

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: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 4c7eb4eb
...@@ -184,6 +184,9 @@ static void sh_cmt_disable(struct sh_cmt_priv *p) ...@@ -184,6 +184,9 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
/* disable channel */ /* disable channel */
sh_cmt_start_stop_ch(p, 0); sh_cmt_start_stop_ch(p, 0);
/* disable interrupts in CMT block */
sh_cmt_write(p, CMCSR, 0);
/* stop clock */ /* stop clock */
clk_disable(p->clk); clk_disable(p->clk);
} }
......
...@@ -138,6 +138,9 @@ static void sh_tmu_disable(struct sh_tmu_priv *p) ...@@ -138,6 +138,9 @@ static void sh_tmu_disable(struct sh_tmu_priv *p)
/* disable channel */ /* disable channel */
sh_tmu_start_stop_ch(p, 0); sh_tmu_start_stop_ch(p, 0);
/* disable interrupts in TMU block */
sh_tmu_write(p, TCR, 0x0000);
/* stop clock */ /* stop clock */
clk_disable(p->clk); clk_disable(p->clk);
} }
......
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