aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Song <Baohua.Song@csr.com>2012-07-30 01:29:30 -0400
committerOlof Johansson <olof@lixom.net>2012-08-02 13:05:27 -0400
commitdebeaf6c2ded82bea65c1a487fb629fb0d2bb66f (patch)
tree5a8855081c766eebab8254d40a6902d782c71d46
parent52c2ebd757d94f4a7215c3fc906646b24f44ecab (diff)
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. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/mach-prima2/timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index 0d024b1e916d..f224107de7bc 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -132,11 +132,11 @@ static void sirfsoc_clocksource_resume(struct clocksource *cs)
132{ 132{
133 int i; 133 int i;
134 134
135 for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++) 135 for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
136 writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]); 136 writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
137 137
138 writel_relaxed(sirfsoc_timer_reg_val[i - 2], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO); 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[i - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI); 139 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
140} 140}
141 141
142static struct clock_event_device sirfsoc_clockevent = { 142static struct clock_event_device sirfsoc_clockevent = {