diff options
author | Mattias WALLIN <mattias.wallin@stericsson.com> | 2011-05-27 10:29:25 +0200 |
---|---|---|
committer | Robert Marklund <robert.marklund@stericsson.com> | 2011-10-05 12:59:42 +0200 |
commit | 84f7b1fa530ad6b95fd66e6c8b7732fd7346168d (patch) | |
tree | f9a99ccbc240b666be28e423bbf506e4d22ba480 /arch | |
parent | 68674d807621a48b09dd31415d318f641574d27d (diff) |
plat-nomadik: MTU sched_clock as an option
This patch makes it possible to configure away the sched_clock
part of the MTU timer.
Change-Id: Id68606e2a2f6c12456655fd6df166fbdd6d71eb1
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32051
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-nomadik/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/plat-nomadik/timer.c | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/plat-nomadik/Kconfig b/arch/arm/plat-nomadik/Kconfig index ce659015535..bca4914b4b9 100644 --- a/arch/arm/plat-nomadik/Kconfig +++ b/arch/arm/plat-nomadik/Kconfig @@ -15,10 +15,16 @@ 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. + endif diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index 7408eb3f008..fcb3156e52e 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c @@ -25,7 +25,7 @@ #include <plat/mtu.h> 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 @@ -49,7 +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, struct clock_event_device *dev) @@ -176,9 +176,9 @@ void __init nmdk_timer_init(void) rate, 200, 32, clocksource_mmio_readl_down)) 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 */ clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE); |