ARM: imx: clk-v610: Add clock for I2C2 and I2C3
[linux-2.6/btrfs-unstable.git] / kernel / time / timekeeping_internal.h
blob4ea005a7f9dab06f30eacc93b2ef18604a321746
1 #ifndef _TIMEKEEPING_INTERNAL_H
2 #define _TIMEKEEPING_INTERNAL_H
3 /*
4 * timekeeping debug functions
5 */
6 #include <linux/clocksource.h>
7 #include <linux/time.h>
9 #ifdef CONFIG_DEBUG_FS
10 extern void tk_debug_account_sleep_time(struct timespec64 *t);
11 #else
12 #define tk_debug_account_sleep_time(x)
13 #endif
15 #ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE
16 static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
18 cycle_t ret = (now - last) & mask;
20 return (s64) ret > 0 ? ret : 0;
22 #else
23 static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
25 return (now - last) & mask;
27 #endif
29 #endif /* _TIMEKEEPING_INTERNAL_H */