8 #ifndef _LINUX_CLOCKSOURCE_H
9 #define _LINUX_CLOCKSOURCE_H
11 #include <linux/types.h>
12 #include <linux/timex.h>
13 #include <linux/time.h>
14 #include <linux/list.h>
18 #include <asm/div64.h>
25 #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
26 #include <asm/clocksource.h>
178 #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
192 #ifdef CONFIG_CLOCKSOURCE_WATCHDOG
203 #define CLOCK_SOURCE_IS_CONTINUOUS 0x01
204 #define CLOCK_SOURCE_MUST_VERIFY 0x02
206 #define CLOCK_SOURCE_WATCHDOG 0x10
207 #define CLOCK_SOURCE_VALID_FOR_HRES 0x20
208 #define CLOCK_SOURCE_UNSTABLE 0x40
211 #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
221 static inline u32 clocksource_khz2mult(
u32 khz,
u32 shift_constant)
230 u64 tmp = ((
u64)1000000) << shift_constant;
247 static inline u32 clocksource_hz2mult(
u32 hz,
u32 shift_constant)
256 u64 tmp = ((
u64)1000000000) << shift_constant;
276 return ((
u64) cycles * mult) >> shift;
312 static inline void __clocksource_updatefreq_hz(
struct clocksource *
cs,
u32 hz)
317 static inline void __clocksource_updatefreq_khz(
struct clocksource *
cs,
u32 khz)