aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/include/asm/timer.h')
-rw-r--r--arch/sh/include/asm/timer.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/sh/include/asm/timer.h b/arch/sh/include/asm/timer.h
new file mode 100644
index 000000000000..a7ca3a195bb5
--- /dev/null
+++ b/arch/sh/include/asm/timer.h
@@ -0,0 +1,44 @@
1#ifndef __ASM_SH_TIMER_H
2#define __ASM_SH_TIMER_H
3
4#include <linux/sysdev.h>
5#include <linux/clocksource.h>
6#include <cpu/timer.h>
7
8struct sys_timer_ops {
9 int (*init)(void);
10 int (*start)(void);
11 int (*stop)(void);
12 cycle_t (*read)(void);
13#ifndef CONFIG_GENERIC_TIME
14 unsigned long (*get_offset)(void);
15#endif
16};
17
18struct sys_timer {
19 const char *name;
20
21 struct sys_device dev;
22 struct sys_timer_ops *ops;
23};
24
25#define TICK_SIZE (tick_nsec / 1000)
26
27extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer;
28extern struct sys_timer *sys_timer;
29
30#ifndef CONFIG_GENERIC_TIME
31static inline unsigned long get_timer_offset(void)
32{
33 return sys_timer->ops->get_offset();
34}
35#endif
36
37/* arch/sh/kernel/timers/timer.c */
38struct sys_timer *get_sys_timer(void);
39
40/* arch/sh/kernel/time.c */
41void handle_timer_tick(void);
42extern unsigned long sh_hpt_frequency;
43
44#endif /* __ASM_SH_TIMER_H */