diff options
-rw-r--r-- | arch/xtensa/include/asm/timex.h | 5 | ||||
-rw-r--r-- | arch/xtensa/kernel/time.c | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h index 69f901713fb6..86aca77339f2 100644 --- a/arch/xtensa/include/asm/timex.h +++ b/arch/xtensa/include/asm/timex.h | |||
@@ -35,13 +35,8 @@ | |||
35 | # error "Bad timer number for Linux configurations!" | 35 | # error "Bad timer number for Linux configurations!" |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT | ||
39 | extern unsigned long ccount_freq; | 38 | extern unsigned long ccount_freq; |
40 | #define CCOUNT_PER_JIFFY (ccount_freq / HZ) | 39 | #define CCOUNT_PER_JIFFY (ccount_freq / HZ) |
41 | #else | ||
42 | #define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ)) | ||
43 | #endif | ||
44 | |||
45 | 40 | ||
46 | typedef unsigned long long cycles_t; | 41 | typedef unsigned long long cycles_t; |
47 | 42 | ||
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 24bb0c1776ba..a65cb3808e1c 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -29,9 +29,7 @@ | |||
29 | #include <asm/timex.h> | 29 | #include <asm/timex.h> |
30 | #include <asm/platform.h> | 30 | #include <asm/platform.h> |
31 | 31 | ||
32 | #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT | ||
33 | unsigned long ccount_freq; /* ccount Hz */ | 32 | unsigned long ccount_freq; /* ccount Hz */ |
34 | #endif | ||
35 | 33 | ||
36 | static cycle_t ccount_read(struct clocksource *cs) | 34 | static cycle_t ccount_read(struct clocksource *cs) |
37 | { | 35 | { |
@@ -129,6 +127,8 @@ void __init time_init(void) | |||
129 | platform_calibrate_ccount(); | 127 | platform_calibrate_ccount(); |
130 | printk("%d.%02d MHz\n", (int)ccount_freq/1000000, | 128 | printk("%d.%02d MHz\n", (int)ccount_freq/1000000, |
131 | (int)(ccount_freq/10000)%100); | 129 | (int)(ccount_freq/10000)%100); |
130 | #else | ||
131 | ccount_freq = CONFIG_XTENSA_CPU_CLOCK*1000000UL; | ||
132 | #endif | 132 | #endif |
133 | clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ); | 133 | clocksource_register_hz(&ccount_clocksource, CCOUNT_PER_JIFFY * HZ); |
134 | 134 | ||