diff options
Diffstat (limited to 'include/asm-sh/timer.h')
-rw-r--r-- | include/asm-sh/timer.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/asm-sh/timer.h b/include/asm-sh/timer.h index 5df842bcf7b6..17b5e76a4c31 100644 --- a/include/asm-sh/timer.h +++ b/include/asm-sh/timer.h | |||
@@ -18,11 +18,32 @@ struct sys_timer { | |||
18 | 18 | ||
19 | struct sys_device dev; | 19 | struct sys_device dev; |
20 | struct sys_timer_ops *ops; | 20 | struct sys_timer_ops *ops; |
21 | |||
22 | #ifdef CONFIG_NO_IDLE_HZ | ||
23 | struct dyn_tick_timer *dyn_tick; | ||
24 | #endif | ||
21 | }; | 25 | }; |
22 | 26 | ||
27 | #ifdef CONFIG_NO_IDLE_HZ | ||
28 | #define DYN_TICK_ENABLED (1 << 1) | ||
29 | |||
30 | struct dyn_tick_timer { | ||
31 | spinlock_t lock; | ||
32 | unsigned int state; /* Current state */ | ||
33 | int (*enable)(void); /* Enables dynamic tick */ | ||
34 | int (*disable)(void); /* Disables dynamic tick */ | ||
35 | void (*reprogram)(unsigned long); /* Reprograms the timer */ | ||
36 | int (*handler)(int, void *); | ||
37 | }; | ||
38 | |||
39 | void timer_dyn_reprogram(void); | ||
40 | #else | ||
41 | #define timer_dyn_reprogram() do { } while (0) | ||
42 | #endif | ||
43 | |||
23 | #define TICK_SIZE (tick_nsec / 1000) | 44 | #define TICK_SIZE (tick_nsec / 1000) |
24 | 45 | ||
25 | extern struct sys_timer tmu_timer; | 46 | extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer; |
26 | extern struct sys_timer *sys_timer; | 47 | extern struct sys_timer *sys_timer; |
27 | 48 | ||
28 | #ifndef CONFIG_GENERIC_TIME | 49 | #ifndef CONFIG_GENERIC_TIME |