diff options
Diffstat (limited to 'arch/arm/mach-mmp/time.c')
-rw-r--r-- | arch/arm/mach-mmp/time.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 4e91ee6e27c8..71fc4ee4602c 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/sched.h> | ||
29 | 28 | ||
30 | #include <asm/sched_clock.h> | 29 | #include <asm/sched_clock.h> |
31 | #include <mach/addr-map.h> | 30 | #include <mach/addr-map.h> |
@@ -42,8 +41,6 @@ | |||
42 | #define MAX_DELTA (0xfffffffe) | 41 | #define MAX_DELTA (0xfffffffe) |
43 | #define MIN_DELTA (16) | 42 | #define MIN_DELTA (16) |
44 | 43 | ||
45 | static DEFINE_CLOCK_DATA(cd); | ||
46 | |||
47 | /* | 44 | /* |
48 | * FIXME: the timer needs some delay to stablize the counter capture | 45 | * FIXME: the timer needs some delay to stablize the counter capture |
49 | */ | 46 | */ |
@@ -59,16 +56,9 @@ static inline uint32_t timer_read(void) | |||
59 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); | 56 | return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(1)); |
60 | } | 57 | } |
61 | 58 | ||
62 | unsigned long long notrace sched_clock(void) | 59 | static u32 notrace mmp_read_sched_clock(void) |
63 | { | 60 | { |
64 | u32 cyc = timer_read(); | 61 | return timer_read(); |
65 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
66 | } | ||
67 | |||
68 | static void notrace mmp_update_sched_clock(void) | ||
69 | { | ||
70 | u32 cyc = timer_read(); | ||
71 | update_sched_clock(&cd, cyc, (u32)~0); | ||
72 | } | 62 | } |
73 | 63 | ||
74 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | 64 | static irqreturn_t timer_interrupt(int irq, void *dev_id) |
@@ -201,7 +191,7 @@ void __init timer_init(int irq) | |||
201 | { | 191 | { |
202 | timer_config(); | 192 | timer_config(); |
203 | 193 | ||
204 | init_sched_clock(&cd, mmp_update_sched_clock, 32, CLOCK_TICK_RATE); | 194 | setup_sched_clock(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); |
205 | 195 | ||
206 | ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift); | 196 | ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift); |
207 | ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt); | 197 | ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt); |