diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
| commit | e02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606 (patch) | |
| tree | 2f3db60be4c57eca2a4c3ab3f3122dcf1ec0c624 /include/linux/timex.h | |
| parent | 600511e86babe3727264a0883a3a264f6fb6caf5 (diff) | |
| parent | f3cab8a0b1a772dc8b055b7affa567a366627c9e (diff) | |
Merge branch 'master'
Diffstat (limited to 'include/linux/timex.h')
| -rw-r--r-- | include/linux/timex.h | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h index b7ca1204e4..03914b7e41 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -97,38 +97,11 @@ | |||
| 97 | 97 | ||
| 98 | #define MAXPHASE 512000L /* max phase error (us) */ | 98 | #define MAXPHASE 512000L /* max phase error (us) */ |
| 99 | #define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */ | 99 | #define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */ |
| 100 | #define MAXTIME (200L << PPS_AVG) /* max PPS error (jitter) (200 us) */ | ||
| 101 | #define MINSEC 16L /* min interval between updates (s) */ | 100 | #define MINSEC 16L /* min interval between updates (s) */ |
| 102 | #define MAXSEC 1200L /* max interval between updates (s) */ | 101 | #define MAXSEC 1200L /* max interval between updates (s) */ |
| 103 | #define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */ | 102 | #define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */ |
| 104 | 103 | ||
| 105 | /* | 104 | /* |
| 106 | * The following defines are used only if a pulse-per-second (PPS) | ||
| 107 | * signal is available and connected via a modem control lead, such as | ||
| 108 | * produced by the optional ppsclock feature incorporated in the Sun | ||
| 109 | * asynch driver. They establish the design parameters of the frequency- | ||
| 110 | * lock loop used to discipline the CPU clock oscillator to the PPS | ||
| 111 | * signal. | ||
| 112 | * | ||
| 113 | * PPS_AVG is the averaging factor for the frequency loop, as well as | ||
| 114 | * the time and frequency dispersion. | ||
| 115 | * | ||
| 116 | * PPS_SHIFT and PPS_SHIFTMAX specify the minimum and maximum | ||
| 117 | * calibration intervals, respectively, in seconds as a power of two. | ||
| 118 | * | ||
| 119 | * PPS_VALID is the maximum interval before the PPS signal is considered | ||
| 120 | * invalid and protocol updates used directly instead. | ||
| 121 | * | ||
| 122 | * MAXGLITCH is the maximum interval before a time offset of more than | ||
| 123 | * MAXTIME is believed. | ||
| 124 | */ | ||
| 125 | #define PPS_AVG 2 /* pps averaging constant (shift) */ | ||
| 126 | #define PPS_SHIFT 2 /* min interval duration (s) (shift) */ | ||
| 127 | #define PPS_SHIFTMAX 8 /* max interval duration (s) (shift) */ | ||
| 128 | #define PPS_VALID 120 /* pps signal watchdog max (s) */ | ||
| 129 | #define MAXGLITCH 30 /* pps signal glitch max (s) */ | ||
| 130 | |||
| 131 | /* | ||
| 132 | * syscall interface - used (mainly by NTP daemon) | 105 | * syscall interface - used (mainly by NTP daemon) |
| 133 | * to discipline kernel clock oscillator | 106 | * to discipline kernel clock oscillator |
| 134 | */ | 107 | */ |
| @@ -246,20 +219,6 @@ extern long time_reftime; /* time at last adjustment (s) */ | |||
| 246 | extern long time_adjust; /* The amount of adjtime left */ | 219 | extern long time_adjust; /* The amount of adjtime left */ |
| 247 | extern long time_next_adjust; /* Value for time_adjust at next tick */ | 220 | extern long time_next_adjust; /* Value for time_adjust at next tick */ |
| 248 | 221 | ||
| 249 | /* interface variables pps->timer interrupt */ | ||
| 250 | extern long pps_offset; /* pps time offset (us) */ | ||
| 251 | extern long pps_jitter; /* time dispersion (jitter) (us) */ | ||
| 252 | extern long pps_freq; /* frequency offset (scaled ppm) */ | ||
| 253 | extern long pps_stabil; /* frequency dispersion (scaled ppm) */ | ||
| 254 | extern long pps_valid; /* pps signal watchdog counter */ | ||
| 255 | |||
| 256 | /* interface variables pps->adjtimex */ | ||
| 257 | extern int pps_shift; /* interval duration (s) (shift) */ | ||
| 258 | extern long pps_jitcnt; /* jitter limit exceeded */ | ||
| 259 | extern long pps_calcnt; /* calibration intervals */ | ||
| 260 | extern long pps_errcnt; /* calibration errors */ | ||
| 261 | extern long pps_stbcnt; /* stability limit exceeded */ | ||
| 262 | |||
| 263 | /** | 222 | /** |
| 264 | * ntp_clear - Clears the NTP state variables | 223 | * ntp_clear - Clears the NTP state variables |
| 265 | * | 224 | * |
| @@ -348,6 +307,8 @@ time_interpolator_reset(void) | |||
| 348 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | 307 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ |
| 349 | extern u64 current_tick_length(void); | 308 | extern u64 current_tick_length(void); |
| 350 | 309 | ||
| 310 | extern int do_adjtimex(struct timex *); | ||
| 311 | |||
| 351 | #endif /* KERNEL */ | 312 | #endif /* KERNEL */ |
| 352 | 313 | ||
| 353 | #endif /* LINUX_TIMEX_H */ | 314 | #endif /* LINUX_TIMEX_H */ |
