ARM: vexpress: add sched_clock() for Versatile Express
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 15 Dec 2010 21:58:50 +0000 (21:58 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 5 Jan 2011 11:16:00 +0000 (11:16 +0000)
Add a sched_clock() implementation to Versatile Express using the new
sched_clock() infrastructure for extending 32bit counters to full
64-bit nanoseconds.

Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig
arch/arm/mach-vexpress/v2m.c
arch/arm/plat-versatile/Makefile

index 34311f40d7139ce8db31bc4aa1ae21af1982eb43..17b5ff0db1dc94b773640ccd6af69c2eca20914a 100644 (file)
@@ -268,6 +268,7 @@ config ARCH_VEXPRESS
        select COMMON_CLKDEV
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
+       select HAVE_SCHED_CLOCK
        select ICST
        select PLAT_VERSATILE
        help
index 7eaa232180a5ae627c3639ba642755444a5d3e27..8c283100a9a0c73232b7eaa4d8cd3b0ebc58f701 100644 (file)
@@ -22,6 +22,8 @@
 #include <mach/clkdev.h>
 #include <mach/motherboard.h>
 
+#include <plat/sched_clock.h>
+
 #include <plat/timer-sp.h>
 
 #include "core.h"
@@ -50,6 +52,8 @@ void __init v2m_map_io(struct map_desc *tile, size_t num)
 
 static void __init v2m_timer_init(void)
 {
+       versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
+
        writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL);
        writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL);
 
index 5cf88e8427b15e66aafa287f1960e937a26fb89a..8bb6ba6d3572b28ad64c075be7a6410f225a6e05 100644 (file)
@@ -1,7 +1,8 @@
 obj-y  := clock.o
 obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
-obj-$(CONFIG_ARCH_REALVIEW) += sched-clock.o
-obj-$(CONFIG_ARCH_VERSATILE) += sched-clock.o
+ifneq ($(CONFIG_ARCH_INTEGRATOR),y)
+obj-y  += sched-clock.o
+endif
 ifeq ($(CONFIG_LEDS_CLASS),y)
 obj-$(CONFIG_ARCH_REALVIEW) += leds.o
 obj-$(CONFIG_ARCH_VERSATILE) += leds.o