diff options
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r-- | include/linux/clocksource.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index a585a29fe7c4..830a250ecf94 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -12,11 +12,13 @@ | |||
12 | #include <linux/timex.h> | 12 | #include <linux/timex.h> |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/timer.h> | ||
15 | #include <asm/div64.h> | 16 | #include <asm/div64.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
18 | /* clocksource cycle base type */ | 19 | /* clocksource cycle base type */ |
19 | typedef u64 cycle_t; | 20 | typedef u64 cycle_t; |
21 | struct clocksource; | ||
20 | 22 | ||
21 | /** | 23 | /** |
22 | * struct clocksource - hardware abstraction for a free running counter | 24 | * struct clocksource - hardware abstraction for a free running counter |
@@ -62,13 +64,22 @@ struct clocksource { | |||
62 | cycle_t cycle_last, cycle_interval; | 64 | cycle_t cycle_last, cycle_interval; |
63 | u64 xtime_nsec, xtime_interval; | 65 | u64 xtime_nsec, xtime_interval; |
64 | s64 error; | 66 | s64 error; |
67 | |||
68 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | ||
69 | /* Watchdog related data, used by the framework */ | ||
70 | struct list_head wd_list; | ||
71 | cycle_t wd_last; | ||
72 | #endif | ||
65 | }; | 73 | }; |
66 | 74 | ||
67 | /* | 75 | /* |
68 | * Clock source flags bits:: | 76 | * Clock source flags bits:: |
69 | */ | 77 | */ |
70 | #define CLOCK_SOURCE_IS_CONTINUOUS 0x01 | 78 | #define CLOCK_SOURCE_IS_CONTINUOUS 0x01 |
71 | #define CLOCK_SOURCE_MUST_VERIFY 0x02 | 79 | #define CLOCK_SOURCE_MUST_VERIFY 0x02 |
80 | |||
81 | #define CLOCK_SOURCE_WATCHDOG 0x10 | ||
82 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 | ||
72 | 83 | ||
73 | /* simplify initialization of mask field */ | 84 | /* simplify initialization of mask field */ |
74 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) | 85 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) |