diff options
Diffstat (limited to 'arch/arm/plat-iop/time.c')
-rw-r--r-- | arch/arm/plat-iop/time.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 568dd0223d17..cbfbbe461788 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/time.h> | 18 | #include <linux/time.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/timex.h> | 20 | #include <linux/timex.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
23 | #include <linux/clocksource.h> | 22 | #include <linux/clocksource.h> |
24 | #include <linux/clockchips.h> | 23 | #include <linux/clockchips.h> |
@@ -52,21 +51,12 @@ static struct clocksource iop_clocksource = { | |||
52 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 51 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
53 | }; | 52 | }; |
54 | 53 | ||
55 | static DEFINE_CLOCK_DATA(cd); | ||
56 | |||
57 | /* | 54 | /* |
58 | * IOP sched_clock() implementation via its clocksource. | 55 | * IOP sched_clock() implementation via its clocksource. |
59 | */ | 56 | */ |
60 | unsigned long long notrace sched_clock(void) | 57 | static u32 notrace iop_read_sched_clock(void) |
61 | { | 58 | { |
62 | u32 cyc = 0xffffffffu - read_tcr1(); | 59 | return 0xffffffffu - read_tcr1(); |
63 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
64 | } | ||
65 | |||
66 | static void notrace iop_update_sched_clock(void) | ||
67 | { | ||
68 | u32 cyc = 0xffffffffu - read_tcr1(); | ||
69 | update_sched_clock(&cd, cyc, (u32)~0); | ||
70 | } | 60 | } |
71 | 61 | ||
72 | /* | 62 | /* |
@@ -152,7 +142,7 @@ void __init iop_init_time(unsigned long tick_rate) | |||
152 | { | 142 | { |
153 | u32 timer_ctl; | 143 | u32 timer_ctl; |
154 | 144 | ||
155 | init_sched_clock(&cd, iop_update_sched_clock, 32, tick_rate); | 145 | setup_sched_clock(iop_read_sched_clock, 32, tick_rate); |
156 | 146 | ||
157 | ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); | 147 | ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); |
158 | iop_tick_rate = tick_rate; | 148 | iop_tick_rate = tick_rate; |