From a9d6d15131b0519363b0c94734ee80955c411093 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 31 Jan 2012 23:38:23 +0100 Subject: ARM: 7310/1: integrator: implement sched_clock across all boards Now that we can select a sched_clock at runtime, let's implement it for the Integrator AP, default-select the one found in all other board it for all plat-versatile boards and make the right clock kick in at runtime. Signed-off-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-integrator/integrator_ap.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm/mach-integrator/integrator_ap.c') diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 21a1d6cbef40..4dde28b9dc07 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -42,6 +42,7 @@ #include #include /* HZ */ #include +#include #include @@ -325,6 +326,11 @@ static void __init ap_init(void) static unsigned long timer_reload; +static u32 notrace integrator_read_sched_clock(void) +{ + return -readl((void __iomem *) TIMER2_VA_BASE + TIMER_VALUE); +} + static void integrator_clocksource_init(unsigned long inrate) { void __iomem *base = (void __iomem *)TIMER2_VA_BASE; @@ -341,6 +347,7 @@ static void integrator_clocksource_init(unsigned long inrate) clocksource_mmio_init(base + TIMER_VALUE, "timer2", rate, 200, 16, clocksource_mmio_readl_down); + setup_sched_clock(integrator_read_sched_clock, 16, rate); } static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE; -- cgit v1.2.3-59-g8ed1b