diff options
-rw-r--r-- | drivers/clocksource/tcb_clksrc.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 745844ee973e..d4ca9962a759 100644 --- a/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/atmel_tc.h> | 12 | #include <linux/atmel_tc.h> |
13 | #include <linux/sched_clock.h> | ||
14 | 13 | ||
15 | 14 | ||
16 | /* | 15 | /* |
@@ -57,14 +56,9 @@ static u64 tc_get_cycles(struct clocksource *cs) | |||
57 | return (upper << 16) | lower; | 56 | return (upper << 16) | lower; |
58 | } | 57 | } |
59 | 58 | ||
60 | static u32 tc_get_cv32(void) | ||
61 | { | ||
62 | return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV)); | ||
63 | } | ||
64 | |||
65 | static u64 tc_get_cycles32(struct clocksource *cs) | 59 | static u64 tc_get_cycles32(struct clocksource *cs) |
66 | { | 60 | { |
67 | return tc_get_cv32(); | 61 | return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV)); |
68 | } | 62 | } |
69 | 63 | ||
70 | static struct clocksource clksrc = { | 64 | static struct clocksource clksrc = { |
@@ -75,11 +69,6 @@ static struct clocksource clksrc = { | |||
75 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 69 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
76 | }; | 70 | }; |
77 | 71 | ||
78 | static u64 notrace tc_read_sched_clock(void) | ||
79 | { | ||
80 | return tc_get_cv32(); | ||
81 | } | ||
82 | |||
83 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 72 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
84 | 73 | ||
85 | struct tc_clkevt_device { | 74 | struct tc_clkevt_device { |
@@ -350,9 +339,6 @@ static int __init tcb_clksrc_init(void) | |||
350 | clksrc.read = tc_get_cycles32; | 339 | clksrc.read = tc_get_cycles32; |
351 | /* setup ony channel 0 */ | 340 | /* setup ony channel 0 */ |
352 | tcb_setup_single_chan(tc, best_divisor_idx); | 341 | tcb_setup_single_chan(tc, best_divisor_idx); |
353 | |||
354 | /* register sched_clock on chips with single 32 bit counter */ | ||
355 | sched_clock_register(tc_read_sched_clock, 32, divided_rate); | ||
356 | } else { | 342 | } else { |
357 | /* tclib will give us three clocks no matter what the | 343 | /* tclib will give us three clocks no matter what the |
358 | * underlying platform supports. | 344 | * underlying platform supports. |