|
@@ -42,6 +42,7 @@
|
|
|
#include <asm/setup.h>
|
|
|
#include <asm/param.h> /* HZ */
|
|
|
#include <asm/mach-types.h>
|
|
|
+#include <asm/sched_clock.h>
|
|
|
|
|
|
#include <mach/lm.h>
|
|
|
|
|
@@ -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;
|