Skip to content

Commit 2cd0ebc

Browse files
FrancescoVirlinzipmundt
authored andcommitted
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>
1 parent 10840f0 commit 2cd0ebc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/sh/kernel/timers/timer-tmu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static void tmu_set_mode(enum clock_event_mode mode,
120120
{
121121
switch (mode) {
122122
case CLOCK_EVT_MODE_PERIODIC:
123-
ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR);
123+
ctrl_outl(tmu_latest_interval[TMU0], TMU0_TCOR);
124124
break;
125125
case CLOCK_EVT_MODE_ONESHOT:
126126
ctrl_outl(0, TMU0_TCOR);

0 commit comments

Comments
 (0)