1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_TIMEX_H
13 #define _LINUX_TIMEX_H
15 #include <linux/compiler.h>
16 #include <linux/time.h>
18 #include <asm/param.h>
25 #define SHIFT_SCALE 22
26 #define SHIFT_UPDATE (SHIFT_KG + MAXTC)
28 #define FINENSEC (1L << (SHIFT_SCALE - 10))
30 #define MAXPHASE 512000L
31 #define MAXFREQ (512L << SHIFT_USEC)
34 #define NTP_PHASE_LIMIT (MAXPHASE << 5)
58 int :32; int :32; int :32; int :32;
59 int :32; int :32; int :32; int :32;
60 int :32; int :32; int :32; int :32;
63 #define ADJ_OFFSET 0x0001
64 #define ADJ_FREQUENCY 0x0002
65 #define ADJ_MAXERROR 0x0004
66 #define ADJ_ESTERROR 0x0008
67 #define ADJ_STATUS 0x0010
68 #define ADJ_TIMECONST 0x0020
69 #define ADJ_TICK 0x4000
70 #define ADJ_OFFSET_SINGLESHOT 0x8001
72 #define MOD_OFFSET ADJ_OFFSET
73 #define MOD_FREQUENCY ADJ_FREQUENCY
74 #define MOD_MAXERROR ADJ_MAXERROR
75 #define MOD_ESTERROR ADJ_ESTERROR
76 #define MOD_STATUS ADJ_STATUS
77 #define MOD_TIMECONST ADJ_TIMECONST
78 #define MOD_CLKB ADJ_TICK
79 #define MOD_CLKA ADJ_OFFSET_SINGLESHOT
81 #define STA_PLL 0x0001
82 #define STA_PPSFREQ 0x0002
83 #define STA_PPSTIME 0x0004
84 #define STA_FLL 0x0008
86 #define STA_INS 0x0010
87 #define STA_DEL 0x0020
88 #define STA_UNSYNC 0x0040
89 #define STA_FREQHOLD 0x0080
91 #define STA_PPSSIGNAL 0x0100
92 #define STA_PPSJITTER 0x0200
93 #define STA_PPSWANDER 0x0400
94 #define STA_PPSERROR 0x0800
96 #define STA_CLOCKERR 0x1000
98 #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR)
106 #define TIME_BAD TIME_ERROR