aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/time.h')
-rw-r--r--include/asm-mips/time.h45
1 files changed, 16 insertions, 29 deletions
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
index bc47af313bcd..a8fd16e1981f 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>
@@ -36,34 +31,13 @@ extern int rtc_mips_set_time(unsigned long);
36extern int rtc_mips_set_mmss(unsigned long); 31extern int rtc_mips_set_mmss(unsigned long);
37 32
38/* 33/*
39 * Timer interrupt functions.
40 * mips_timer_state is needed for high precision timer calibration.
41 * mips_timer_ack may be NULL if the interrupt is self-recoverable.
42 */
43extern int (*mips_timer_state)(void);
44
45/*
46 * High precision timer clocksource.
47 * If .read is NULL, an R4k-compatible timer setup is attempted.
48 */
49extern struct clocksource clocksource_mips;
50
51/*
52 * profiling and process accouting is done separately in local_timer_interrupt
53 */
54extern void local_timer_interrupt(int irq, void *dev_id);
55
56/*
57 * board specific routines required by time_init(). 34 * board specific routines required by time_init().
58 */ 35 */
59struct irqaction;
60extern void plat_time_init(void); 36extern void plat_time_init(void);
61extern void plat_timer_setup(struct irqaction *irq);
62 37
63/* 38/*
64 * mips_hpt_frequency - must be set if you intend to use an R4k-compatible 39 * mips_hpt_frequency - must be set if you intend to use an R4k-compatible
65 * counter as a timer interrupt source; otherwise it can be set up 40 * counter as a timer interrupt source.
66 * automagically with an aid of mips_timer_state.
67 */ 41 */
68extern unsigned int mips_hpt_frequency; 42extern unsigned int mips_hpt_frequency;
69 43
@@ -77,9 +51,22 @@ extern int (*perf_irq)(void);
77 * Initialize the calling CPU's compare interrupt as clockevent device 51 * Initialize the calling CPU's compare interrupt as clockevent device
78 */ 52 */
79#ifdef CONFIG_CEVT_R4K 53#ifdef CONFIG_CEVT_R4K
80extern void mips_clockevent_init(void); 54extern int mips_clockevent_init(void);
55extern unsigned int __weak get_c0_compare_int(void);
56#else
57static inline int mips_clockevent_init(void)
58{
59 return -ENXIO;
60}
61#endif
62
63/*
64 * Initialize the count register as a clocksource
65 */
66#ifdef CONFIG_CEVT_R4K
67extern void init_mips_clocksource(void);
81#else 68#else
82static inline void mips_clockevent_init(void) 69static inline void init_mips_clocksource(void)
83{ 70{
84} 71}
85#endif 72#endif