ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime
[pandora-kernel.git] / arch / arm / mach-u300 / timer.c
index 5f51bde..bc1c789 100644 (file)
@@ -9,7 +9,6 @@
  * Author: Linus Walleij <linus.walleij@stericsson.com>
  */
 #include <linux/interrupt.h>
-#include <linux/sched.h>
 #include <linux/time.h>
 #include <linux/timex.h>
 #include <linux/clockchips.h>
@@ -337,18 +336,10 @@ static struct irqaction u300_timer_irq = {
  * this wraps around for now, since it is just a relative time
  * stamp. (Inspired by OMAP implementation.)
  */
-static DEFINE_CLOCK_DATA(cd);
 
-unsigned long long notrace sched_clock(void)
+static u32 notrace u300_read_sched_clock(void)
 {
-       u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC);
-       return cyc_to_sched_clock(&cd, cyc, (u32)~0);
-}
-
-static void notrace u300_update_sched_clock(void)
-{
-       u32 cyc = readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC);
-       update_sched_clock(&cd, cyc, (u32)~0);
+       return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC);
 }
 
 
@@ -366,7 +357,7 @@ static void __init u300_timer_init(void)
        clk_enable(clk);
        rate = clk_get_rate(clk);
 
-       init_sched_clock(&cd, u300_update_sched_clock, 32, rate);
+       setup_sched_clock(u300_read_sched_clock, 32, rate);
 
        /*
         * Disable the "OS" and "DD" timers - these are designed for Symbian!