aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-nomadik/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index 0ae2b068ee0f..f9114306657b 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -201,7 +201,8 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
201 clk_prescale = MTU_CRn_PRESCALE_1; 201 clk_prescale = MTU_CRn_PRESCALE_1;
202 } 202 }
203 203
204 nmdk_cycle = (rate + HZ/2) / HZ; 204 /* Cycles for periodic mode */
205 nmdk_cycle = DIV_ROUND_CLOSEST(rate, HZ);
205 206
206 207
207 /* Timer 0 is the free running clocksource */ 208 /* Timer 0 is the free running clocksource */