linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: delay: set loops_per_jiffy when moving to timer-based loop
@ 2012-08-24 14:13 Will Deacon
  2012-08-24 14:13 ` [PATCH 2/2] ARM: delay: add registration mechanism for delay timer sources Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2012-08-24 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

The delay functions may be called by some platforms between switching to
the timer-based delay loop but before calibration. In this case, the
initial loops_per_jiffy may not be suitable for the timer (although a
compromise may be achievable) and delay times may be considered too
inaccurate.

This patch updates loops_per_jiffy when switching to the timer-based
delay loop so that delays are consistent prior to calibration.

Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm/lib/delay.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c
index d6dacc6..395d5fb 100644
--- a/arch/arm/lib/delay.c
+++ b/arch/arm/lib/delay.c
@@ -59,6 +59,7 @@ void __init init_current_timer_delay(unsigned long freq)
 {
 	pr_info("Switching to timer-based delay loop\n");
 	lpj_fine			= freq / HZ;
+	loops_per_jiffy			= lpj_fine;
 	arm_delay_ops.delay		= __timer_delay;
 	arm_delay_ops.const_udelay	= __timer_const_udelay;
 	arm_delay_ops.udelay		= __timer_udelay;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-27 23:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 14:13 [PATCH 1/2] ARM: delay: set loops_per_jiffy when moving to timer-based loop Will Deacon
2012-08-24 14:13 ` [PATCH 2/2] ARM: delay: add registration mechanism for delay timer sources Will Deacon
2012-08-27 21:18   ` [PATCH] ARM: MSM: Implement read_current_timer for msm timers Stephen Boyd
2012-08-27 23:59     ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).