* [PATCH 1/3] plat-nomadik: MTU sched_clock as an option
@ 2011-05-31 8:30 Mattias Wallin
2011-05-31 14:03 ` Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Mattias Wallin @ 2011-05-31 8:30 UTC (permalink / raw)
To: linux-arm-kernel
This patch makes it possible to configure away the sched_clock
part of the MTU timer.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/plat-nomadik/Kconfig | 8 +++++++-
arch/arm/plat-nomadik/timer.c | 4 ++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-nomadik/Kconfig b/arch/arm/plat-nomadik/Kconfig
index 18296ee..d8101a4 100644
--- a/arch/arm/plat-nomadik/Kconfig
+++ b/arch/arm/plat-nomadik/Kconfig
@@ -15,12 +15,18 @@ if PLAT_NOMADIK
config HAS_MTU
bool
- select HAVE_SCHED_CLOCK
help
Support for Multi Timer Unit. MTU provides access
to multiple interrupt generating programmable
32-bit free running decrementing counters.
+config NOMADIK_MTU_SCHED_CLOCK
+ bool
+ depends on HAS_MTU
+ select HAVE_SCHED_CLOCK
+ help
+ Use the Multi Timer Unit as the sched_clock.
+
config NOMADIK_GPIO
bool
help
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index ef74e15..b55c4ec 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -25,6 +25,7 @@
void __iomem *mtu_base; /* Assigned by machine code */
+#ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK
/*
* Override the global weak sched_clock symbol with this
* local implementation which uses the clocksource to get some
@@ -48,6 +49,7 @@ static void notrace nomadik_update_sched_clock(void)
u32 cyc = -readl(mtu_base + MTU_VAL(0));
update_sched_clock(&cd, cyc, (u32)~0);
}
+#endif
/* Clockevent device: use one-shot mode */
static void nmdk_clkevt_mode(enum clock_event_mode mode,
@@ -154,7 +156,9 @@ void __init nmdk_timer_init(void)
pr_err("timer: failed to initialize clock source %s\n",
"mtu_0");
+#ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK
init_sched_clock(&cd, nomadik_update_sched_clock, 32, rate);
+#endif
/* Timer 1 is used for events */
--
1.7.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 1/3] plat-nomadik: MTU sched_clock as an option
2011-05-31 8:30 [PATCH 1/3] plat-nomadik: MTU sched_clock as an option Mattias Wallin
@ 2011-05-31 14:03 ` Russell King - ARM Linux
2011-05-31 17:02 ` Mattias Wallin
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2011-05-31 14:03 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 31, 2011 at 10:30:23AM +0200, Mattias Wallin wrote:
> This patch makes it possible to configure away the sched_clock
> part of the MTU timer.
We really need better changelogs than this. Rather than saying just what
the patch is doing, please also say _why_ the change is required - you
can't expect people reading the patch to guess that kind of thing.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/3] plat-nomadik: MTU sched_clock as an option
2011-05-31 14:03 ` Russell King - ARM Linux
@ 2011-05-31 17:02 ` Mattias Wallin
0 siblings, 0 replies; 3+ messages in thread
From: Mattias Wallin @ 2011-05-31 17:02 UTC (permalink / raw)
To: linux-arm-kernel
On 05/31/2011 04:03 PM, Russell King - ARM Linux wrote:
> On Tue, May 31, 2011 at 10:30:23AM +0200, Mattias Wallin wrote:
>> This patch makes it possible to configure away the sched_clock
>> part of the MTU timer.
>
> We really need better changelogs than this. Rather than saying just what
> the patch is doing, please also say _why_ the change is required - you
> can't expect people reading the patch to guess that kind of thing.
Thanks for the input Russell. I'll give it a new try.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-31 17:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-31 8:30 [PATCH 1/3] plat-nomadik: MTU sched_clock as an option Mattias Wallin
2011-05-31 14:03 ` Russell King - ARM Linux
2011-05-31 17:02 ` Mattias Wallin
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).