History

ARM: PRIMA2: delete redundant codes to restore LATCHED when timer resumes

The only way to write LATCHED registers to write LATCH_BIT to LATCH register, that will latch COUNTER into LATCHED.e.g. writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH); Writing values to LATCHED registers directly is useless at all.

Barry Song committed 14 years ago

Commit debeaf61 parent 52c2ebd1 file · +3 −3Browse files

Unified · Split

arch/arm/mach-prima2/timer.c+3−3
@@ -132,11 +132,11 @@ static void sirfsoc_clocksource_resume(struct clocksource *cs) · 131 unmodified lines
132132 {
133133 int i;
134134
135− for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++)
135+ for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
136136 writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
137137
138− writel_relaxed(sirfsoc_timer_reg_val[i - 2], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);
139− writel_relaxed(sirfsoc_timer_reg_val[i - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
138+ writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);
139+ writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
140140 }
141141
142142 static struct clock_event_device sirfsoc_clockevent = {