* [PATCH] OMAP2: gptimer min_delta_ns corrected
@ 2009-01-02 15:07 Aaro Koskinen
2009-01-02 17:28 ` Woodruff, Richard
0 siblings, 1 reply; 3+ messages in thread
From: Aaro Koskinen @ 2009-01-02 15:07 UTC (permalink / raw)
To: linux-omap
When 32 kHz timer is used the min_delta_ns should be initialized so
that it reflects the timer programming cost. A write to the timer
device will be usually posted, but it takes roughly 3 cycles before
it is effective. If the timer is reprogrammed before that, the CPU
will stall until the previous write completes. This was pointed out by
Richard Woodruff.
Since the lower bound for min_delta_ns is 1000, the change is visible
only with tick rates less than 3 MHz.
Also note that the old value is incorrect for 32 kHz also due to
a rounding error, and it can cause the timer queue to hang (due to
clockevent code trying to program the timer with zero ticks).
Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
---
arch/arm/mach-omap2/timer-gp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 787cfef..3e66a9a 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -121,7 +121,8 @@ static void __init omap2_gp_clockevent_init(void)
clockevent_gpt.max_delta_ns =
clockevent_delta2ns(0xffffffff, &clockevent_gpt);
clockevent_gpt.min_delta_ns =
- clockevent_delta2ns(1, &clockevent_gpt);
+ clockevent_delta2ns(3, &clockevent_gpt);
+ /* Timer internal resynch latency. */
clockevent_gpt.cpumask = cpumask_of_cpu(0);
clockevents_register_device(&clockevent_gpt);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] OMAP2: gptimer min_delta_ns corrected
2009-01-02 15:07 [PATCH] OMAP2: gptimer min_delta_ns corrected Aaro Koskinen
@ 2009-01-02 17:28 ` Woodruff, Richard
2009-01-09 11:59 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Woodruff, Richard @ 2009-01-02 17:28 UTC (permalink / raw)
To: Aaro Koskinen, linux-omap@vger.kernel.org
Hi,
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Aaro Koskinen
> Sent: Friday, January 02, 2009 9:07 AM
> To: linux-omap@vger.kernel.org
> Subject: [PATCH] OMAP2: gptimer min_delta_ns corrected
> Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Looks good.
Reviewed-by: Richard Woodruff <r-woodruff2@ti.com>
Regards,
Richard W.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAP2: gptimer min_delta_ns corrected
2009-01-02 17:28 ` Woodruff, Richard
@ 2009-01-09 11:59 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2009-01-09 11:59 UTC (permalink / raw)
To: Woodruff, Richard; +Cc: Aaro Koskinen, linux-omap@vger.kernel.org
* Woodruff, Richard <r-woodruff2@ti.com> [090102 19:29]:
> Hi,
>
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Aaro Koskinen
> > Sent: Friday, January 02, 2009 9:07 AM
> > To: linux-omap@vger.kernel.org
> > Subject: [PATCH] OMAP2: gptimer min_delta_ns corrected
>
> > Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
>
> Looks good.
>
> Reviewed-by: Richard Woodruff <r-woodruff2@ti.com>
Pushing to l-o tree and adding to omap-fixes queue for mainline
kernel.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-09 11:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 15:07 [PATCH] OMAP2: gptimer min_delta_ns corrected Aaro Koskinen
2009-01-02 17:28 ` Woodruff, Richard
2009-01-09 11:59 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox