diff options
author | Francesco VIRLINZI <francesco.virlinzi@st.com> | 2008-10-15 05:58:24 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-11-13 03:40:30 -0500 |
commit | 2cd0ebc83d771220eeddec91fd6d4cfefc2cc46e (patch) | |
tree | 605460bfa32601f7353f7be532c48b1456c8b7c3 /arch/sh/kernel/timers/timer-tmu.c | |
parent | 10840f034e2329150ce0e683e636ea13b268d333 (diff) |
sh: Fixed the TMU0 reload value on resume
This patch fixes the TMU0 interrupt frequency on suspend/resume.
During the resume the kernel reprograms the TMU0.ClockEvent mode
but if the mode is periodic than the TMU0.TCOR is updated with
a random wrong value without taking care latest valid saved value.
There was no problem with No_HZ system where TMU0.TCOR isn't used.
Signed-off-by: Francesco M. Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/timers/timer-tmu.c')
-rw-r--r-- | arch/sh/kernel/timers/timer-tmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index aaaf90d06b85..3c61ddd4d43e 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -120,7 +120,7 @@ static void tmu_set_mode(enum clock_event_mode mode, | |||
120 | { | 120 | { |
121 | switch (mode) { | 121 | switch (mode) { |
122 | case CLOCK_EVT_MODE_PERIODIC: | 122 | case CLOCK_EVT_MODE_PERIODIC: |
123 | ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR); | 123 | ctrl_outl(tmu_latest_interval[TMU0], TMU0_TCOR); |
124 | break; | 124 | break; |
125 | case CLOCK_EVT_MODE_ONESHOT: | 125 | case CLOCK_EVT_MODE_ONESHOT: |
126 | ctrl_outl(0, TMU0_TCOR); | 126 | ctrl_outl(0, TMU0_TCOR); |