diff options
Diffstat (limited to 'include/asm-mips/time.h')
-rw-r--r-- | include/asm-mips/time.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index bc47af313bcd..7717934f94c3 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h | |||
@@ -10,15 +10,10 @@ | |||
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | * | ||
14 | * Please refer to Documentation/mips/time.README. | ||
15 | */ | 13 | */ |
16 | #ifndef _ASM_TIME_H | 14 | #ifndef _ASM_TIME_H |
17 | #define _ASM_TIME_H | 15 | #define _ASM_TIME_H |
18 | 16 | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/linkage.h> | ||
21 | #include <linux/ptrace.h> | ||
22 | #include <linux/rtc.h> | 17 | #include <linux/rtc.h> |
23 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
24 | #include <linux/clockchips.h> | 19 | #include <linux/clockchips.h> |
@@ -38,27 +33,13 @@ extern int rtc_mips_set_mmss(unsigned long); | |||
38 | /* | 33 | /* |
39 | * Timer interrupt functions. | 34 | * Timer interrupt functions. |
40 | * mips_timer_state is needed for high precision timer calibration. | 35 | * mips_timer_state is needed for high precision timer calibration. |
41 | * mips_timer_ack may be NULL if the interrupt is self-recoverable. | ||
42 | */ | 36 | */ |
43 | extern int (*mips_timer_state)(void); | 37 | extern int (*mips_timer_state)(void); |
44 | 38 | ||
45 | /* | 39 | /* |
46 | * High precision timer clocksource. | ||
47 | * If .read is NULL, an R4k-compatible timer setup is attempted. | ||
48 | */ | ||
49 | extern struct clocksource clocksource_mips; | ||
50 | |||
51 | /* | ||
52 | * profiling and process accouting is done separately in local_timer_interrupt | ||
53 | */ | ||
54 | extern void local_timer_interrupt(int irq, void *dev_id); | ||
55 | |||
56 | /* | ||
57 | * board specific routines required by time_init(). | 40 | * board specific routines required by time_init(). |
58 | */ | 41 | */ |
59 | struct irqaction; | ||
60 | extern void plat_time_init(void); | 42 | extern void plat_time_init(void); |
61 | extern void plat_timer_setup(struct irqaction *irq); | ||
62 | 43 | ||
63 | /* | 44 | /* |
64 | * mips_hpt_frequency - must be set if you intend to use an R4k-compatible | 45 | * mips_hpt_frequency - must be set if you intend to use an R4k-compatible |
@@ -77,9 +58,22 @@ extern int (*perf_irq)(void); | |||
77 | * Initialize the calling CPU's compare interrupt as clockevent device | 58 | * Initialize the calling CPU's compare interrupt as clockevent device |
78 | */ | 59 | */ |
79 | #ifdef CONFIG_CEVT_R4K | 60 | #ifdef CONFIG_CEVT_R4K |
80 | extern void mips_clockevent_init(void); | 61 | extern int mips_clockevent_init(void); |
62 | extern unsigned int __weak get_c0_compare_int(void); | ||
63 | #else | ||
64 | static inline int mips_clockevent_init(void) | ||
65 | { | ||
66 | return -ENXIO; | ||
67 | } | ||
68 | #endif | ||
69 | |||
70 | /* | ||
71 | * Initialize the count register as a clocksource | ||
72 | */ | ||
73 | #ifdef CONFIG_CEVT_R4K | ||
74 | extern void init_mips_clocksource(void); | ||
81 | #else | 75 | #else |
82 | static inline void mips_clockevent_init(void) | 76 | static inline void init_mips_clocksource(void) |
83 | { | 77 | { |
84 | } | 78 | } |
85 | #endif | 79 | #endif |