Commit Graph

16 Commits (6e4734316f26ee715f389407ffd37bc97449c8a1)

Author SHA1 Message Date
Libor Pechacek 6e4734316f Document PTP time scale usage and provide examples
Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
2013-06-03 15:59:01 +02:00
Jacob Keller 73105bc65a phc2sys: update open_clock and deprecate '-i' option
This patch modifies phc2sys to enable the use of interface names in clock_open
rather than having to do that by hand. This enables cleaner use of the -s and -c
options as they can accept interface names. This also enables the user to set
the slave clock by network interface as well.

-v2-
* fix clock_open as it used device instead of phc_device in the final call to phc_open

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2013-05-16 19:58:23 +02:00
Miroslav Lichvar 24c4e851fc phc2sys: Add option to set domain number.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-04-09 07:08:44 +02:00
Miroslav Lichvar 4e24248a71 Add options to not apply leap seconds in kernel.
Add kernel_leap option for ptp4l and -x option for phc2sys to disable
setting of the STA_INS/STA_DEL bit to slowly correct the one-second
offset by servo.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-03-20 19:37:40 +01:00
Miroslav Lichvar 58b1f3f37d phc2sys: Update sync offset periodically with -w.
Modify the pmc to allow non-blocking operation. Run it on each clock
update to have the sync offset updated from currentUtcOffset with every
other call.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-03-20 19:37:39 +01:00
Miroslav Lichvar 3136e3e46c Add summary statistics.
Add new options to ptp4l and phc2sys to print summary statistics of the
clock instead of the individual samples.

[ RC - Fix () function prototype with (void).
     - Use unsigned for sample counter.
     - Fix over-zealous line breaks. ]

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-02-09 10:09:25 +01:00
Miroslav Lichvar 9e7517a31a Remove trailing whitespaces.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-02-06 19:30:02 +01:00
Miroslav Lichvar 158daa697d phc2sys: Use printing facility.
Use pr_* functions to print messages and add -m, -q, -l options to allow
configuration of the printing level and where should be the messages sent.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-02-06 19:30:01 +01:00
Miroslav Lichvar 09fdc45220 phc2sys: Add option to set step threshold.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-02-06 19:30:01 +01:00
Miroslav Lichvar 74692bb1b0 phc2sys: include PTP management client.
Add a new option to wait for ptp4l to be in a synchronized state.
Periodically check PORT_DATA_SET and wait until there is a port in
SLAVE, MASTER or GRAND_MASTER state. Also, set the default
synchronization offset according to the currentUtcOffset value from
TIME_PROPERTIES_DATA_SET and the direction of the clock synchronization.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-02-03 19:08:34 +01:00
Miroslav Lichvar 24a1a6a81e phc2sys: allow PPS loop only with system clock.
The PPS time stamps are always made by the system clock, don't allow
running the PPS loop with other clocks.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-18 07:11:19 +01:00
Miroslav Lichvar c5ce4ef764 phc2sys: read PHC with each PPS sample.
In the PPS loop, instead of setting the system clock from the PHC only
once on start, read PHC with each PPS sample and use the time stamp to
get the whole number of seconds in the offset. This will prevent phc2sys
from losing track of the system clock.

Also, check if the PPS is synchronized to the PHC.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-18 07:11:19 +01:00
Richard Cochran 39e8ee0642 Add command line options to print the software version.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-10 15:11:51 +01:00
Miroslav Lichvar 1a83619b17 phc2sys: add option to set slave-master time offset.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2012-11-08 18:17:31 +01:00
Miroslav Lichvar d0714a9fac phc2sys: add selecting clock by name.
This allows synchronization of a PHC to the system clock.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2012-11-01 19:35:10 +01:00
Miroslav Lichvar 2f3b9f718f Add man pages.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2012-11-01 19:35:09 +01:00