Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-sh / timer.h
blobdd6579c0b04cf01cca86ad41238394d74697e244
1 #ifndef __ASM_SH_TIMER_H
2 #define __ASM_SH_TIMER_H
4 #include <linux/sysdev.h>
5 #include <asm/cpu/timer.h>
7 struct sys_timer_ops {
8 int (*init)(void);
9 unsigned long (*get_offset)(void);
10 unsigned long (*get_frequency)(void);
13 struct sys_timer {
14 const char *name;
16 struct sys_device dev;
17 struct sys_timer_ops *ops;
20 #define TICK_SIZE (tick_nsec / 1000)
22 extern struct sys_timer tmu_timer;
23 extern struct sys_timer *sys_timer;
25 static inline unsigned long get_timer_offset(void)
27 return sys_timer->ops->get_offset();
30 static inline unsigned long get_timer_frequency(void)
32 return sys_timer->ops->get_frequency();
35 /* arch/sh/kernel/timers/timer.c */
36 struct sys_timer *get_sys_timer(void);
38 /* arch/sh/kernel/time.c */
39 void handle_timer_tick(struct pt_regs *);
41 #endif /* __ASM_SH_TIMER_H */