* [PATCHv2] ARM: msm: Implement read_current_timer for msm timers
@ 2012-08-31 0:00 Stephen Boyd
2012-09-04 22:14 ` David Brown
2012-09-04 23:21 ` David Brown
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Boyd @ 2012-08-31 0:00 UTC (permalink / raw)
To: linux-arm-kernel
Setup the same timer used as the clocksource to be used as the
read_current_timer implementation. This allows us to support a
stable udelay implementation on MSMs where it's possible for the
CPUs to scale speeds independently of one another.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
Changes since v1:
* Updated for new function signature
arch/arm/mach-msm/timer.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index ce6b008..6e3b91b 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -28,6 +28,7 @@
#include <asm/hardware/gic.h>
#include <asm/localtimer.h>
#include <asm/sched_clock.h>
+#include <asm/delay.h>
#include "common.h"
@@ -173,6 +174,15 @@ static notrace u32 msm_sched_clock_read(void)
return msm_clocksource.read(&msm_clocksource);
}
+static unsigned long msm_read_current_timer(void)
+{
+ return msm_clocksource.read(&msm_clocksource);
+}
+
+static struct delay_timer msm_delay_timer = {
+ .read_current_timer = msm_read_current_timer,
+};
+
static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq,
bool percpu)
{
@@ -217,6 +227,8 @@ err:
if (res)
pr_err("clocksource_register failed\n");
setup_sched_clock(msm_sched_clock_read, sched_bits, dgt_hz);
+ msm_delay_timer.freq = dgt_hz;
+ register_current_timer_delay(&msm_delay_timer);
}
#ifdef CONFIG_OF
--
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 related [flat|nested] 4+ messages in thread
* [PATCHv2] ARM: msm: Implement read_current_timer for msm timers
2012-08-31 0:00 [PATCHv2] ARM: msm: Implement read_current_timer for msm timers Stephen Boyd
@ 2012-09-04 22:14 ` David Brown
2012-09-04 23:21 ` David Brown
1 sibling, 0 replies; 4+ messages in thread
From: David Brown @ 2012-09-04 22:14 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 30, 2012 at 05:00:22PM -0700, Stephen Boyd wrote:
> Setup the same timer used as the clocksource to be used as the
> read_current_timer implementation. This allows us to support a
> stable udelay implementation on MSMs where it's possible for the
> CPUs to scale speeds independently of one another.
Did you intend to send this "To" the MSM maintainers? As it stands,
it's a little ambiguous who is supposed to pick up this patch, since I
don't think Will maintains a tree with pull requests.
David
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCHv2] ARM: msm: Implement read_current_timer for msm timers
2012-08-31 0:00 [PATCHv2] ARM: msm: Implement read_current_timer for msm timers Stephen Boyd
2012-09-04 22:14 ` David Brown
@ 2012-09-04 23:21 ` David Brown
2012-09-05 8:42 ` Will Deacon
1 sibling, 1 reply; 4+ messages in thread
From: David Brown @ 2012-09-04 23:21 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 30, 2012 at 05:00:22PM -0700, Stephen Boyd wrote:
> Setup the same timer used as the clocksource to be used as the
> read_current_timer implementation. This allows us to support a
> stable udelay implementation on MSMs where it's possible for the
> CPUs to scale speeds independently of one another.
>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Will, let me know if you'd prefer that I pull this.
David
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCHv2] ARM: msm: Implement read_current_timer for msm timers
2012-09-04 23:21 ` David Brown
@ 2012-09-05 8:42 ` Will Deacon
0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2012-09-05 8:42 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 05, 2012 at 12:21:11AM +0100, David Brown wrote:
> On Thu, Aug 30, 2012 at 05:00:22PM -0700, Stephen Boyd wrote:
> > Setup the same timer used as the clocksource to be used as the
> > read_current_timer implementation. This allows us to support a
> > stable udelay implementation on MSMs where it's possible for the
> > CPUs to scale speeds independently of one another.
> >
> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>
> Acked-by: David Brown <davidb@codeaurora.org>
>
> Will, let me know if you'd prefer that I pull this.
It probably makes sense for you to take Stephen's patch, however I'll merge
my series through Russell separately. If you want it for 3.7, I can ask Arnd
to pull it into arm-soc as well?
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-05 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 0:00 [PATCHv2] ARM: msm: Implement read_current_timer for msm timers Stephen Boyd
2012-09-04 22:14 ` David Brown
2012-09-04 23:21 ` David Brown
2012-09-05 8:42 ` 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).