* Re: [PATCH] ARM: local timers: Add A15 architected timer support
@ 2011-12-02 22:58 Sathish Ambley
0 siblings, 0 replies; only message in thread
From: Sathish Ambley @ 2011-12-02 22:58 UTC (permalink / raw)
To: Marc Zyngier; +Cc: linux-arm-msm
Hi Marc,
As part of testing ARM Generic Timer support on MSM platform with your local timers patch, ran into a behavior for which I could not find documentation in the ARM spec.
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060489.html
+static int arch_timer_set_next_event(unsigned long evt,
+ struct clock_event_device *unused)
+{
+ unsigned long ctrl;
+
+ ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL);
+ ctrl |= ARCH_TIMER_CTRL_ENABLE;
+ ctrl &= ~ARCH_TIMER_CTRL_IT_MASK;
+
+ arch_timer_reg_write(ARCH_TIMER_REG_TVAL, evt);
+ arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl);
+
+ return 0;
+}
+
On MSM platforms, timer interrupt is level triggered and is de-asserted when a new TVAL is written only when the interrupt is unmasked. In arch_timer_set_next_event() routine since the TVAL is written with the interrupts masked, the level triggered interrupt never gets de-asserted.
- arch_timer_reg_write(ARCH_TIMER_REG_TVAL, evt);
arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl);
+ arch_timer_reg_write(ARCH_TIMER_REG_TVAL, evt);
Changing the ordering to unmask the interrupt first and then updating the TVAL as above works on MSM platform. Would you happen to know if this behavior is documented in ARM specification, if so where I could find this information.
Also if there is a more recent patch, could you point me to it.
Thanks
Sathish
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-02 22:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 22:58 [PATCH] ARM: local timers: Add A15 architected timer support Sathish Ambley
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).