OMAP: Add new function to check wether there is irq pending
[linux-ginger.git] / arch / sh / include / asm / timer.h
blob4c3b66e30af23fccb48b2392b54ae5cbb581827c
1 #ifndef __ASM_SH_TIMER_H
2 #define __ASM_SH_TIMER_H
4 #include <linux/sysdev.h>
5 #include <linux/clocksource.h>
6 #include <cpu/timer.h>
8 struct sys_timer_ops {
9 int (*init)(void);
10 int (*start)(void);
11 int (*stop)(void);
12 #ifndef CONFIG_GENERIC_TIME
13 unsigned long (*get_offset)(void);
14 #endif
17 struct sys_timer {
18 const char *name;
20 struct sys_device dev;
21 struct sys_timer_ops *ops;
24 #define TICK_SIZE (tick_nsec / 1000)
26 extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer;
27 extern struct sys_timer *sys_timer;
29 #ifndef CONFIG_GENERIC_TIME
30 static inline unsigned long get_timer_offset(void)
32 return sys_timer->ops->get_offset();
34 #endif
36 /* arch/sh/kernel/timers/timer.c */
37 struct sys_timer *get_sys_timer(void);
39 /* arch/sh/kernel/time.c */
40 void handle_timer_tick(void);
42 extern struct clocksource clocksource_sh;
44 #endif /* __ASM_SH_TIMER_H */