[Linuxptp-devel] [PATCH RFC] Introduce an option to ignore the transport specific field.

2018-02-28 Thread Richard Cochran
Up until now the transportSpecific field has been treated according to 802.1AS, namely as a field that must match exactly on receive. However, 1588 mandates ignoring this field for some transports, and there is equipment in the wild that does in fact set the reserved bits. This patch adds an

Re: [Linuxptp-devel] [PATCH 00/13] Prepare for sub-nanosecond timestamps

2018-02-28 Thread Richard Cochran
On Thu, Mar 01, 2018 at 01:21:35AM +, Michael Brown wrote: > The following series of patches adds support required for > sub-nanosecond timestamps in ptp4l. The kernel-to-userspace API data > structures for reporting such timestamps are not yet defined, but this > code is verified to achieve

[Linuxptp-devel] [PATCH 13/13] servo: Include fractional nanoseconds within clock offset

2018-02-28 Thread Michael Brown
Pass the clock offset to servo_sample() as a floating point value, allowing the servo to take fractional nanoseconds into account. Note that a floating point value can sensibly hold a clock offset, but cannot sensibly hold an absolute time due to its limited range. Servos that perform

[Linuxptp-devel] [PATCH 11/13] clock: Print statistics as floating point values

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- clock.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/clock.c b/clock.c index c887a11..d72efb2 100644 --- a/clock.c +++ b/clock.c @@ -545,15 +545,15 @@ static void clock_stats_update(struct

[Linuxptp-devel] [PATCH 03/13] tmv: Add missing uses of tmv_dbl()

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- tsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsproc.c b/tsproc.c index 06c0184..b50c8e5 100644 --- a/tsproc.c +++ b/tsproc.c @@ -214,7 +214,7 @@ int tsproc_update_offset(struct tsproc *tsp, tmv_t *offset,

[Linuxptp-devel] [PATCH 00/13] Prepare for sub-nanosecond timestamps

2018-02-28 Thread Michael Brown
The following series of patches adds support required for sub-nanosecond timestamps in ptp4l. The kernel-to-userspace API data structures for reporting such timestamps are not yet defined, but this code is verified to achieve sub-nanosecond synchronisation over IPv6 (6LoWPAN) using a DecaWave

[Linuxptp-devel] [PATCH 08/13] tmv: Include fractional nanoseconds within internal representation

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- makefile | 2 +- tmv.c| 136 +++ tmv.h| 112 +--- 3 files changed, 156 insertions(+), 94 deletions(-) create mode

[Linuxptp-devel] [PATCH 09/13] tmv: Add converters for hardware timestamps

2018-02-28 Thread Michael Brown
Add converters between hardware timestamps and the internal representation, and remove code that directly manipulates the timespec within a hardware timestamp. This is a prerequisite for the use of hardware timestamps with sub-nanosecond granularity. Signed-off-by: Michael Brown

[Linuxptp-devel] [PATCH 12/13] tsproc: Print statistics as floating point values

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- tsproc.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tsproc.c b/tsproc.c index a871049..0597f40 100644 --- a/tsproc.c +++ b/tsproc.c @@ -134,11 +134,10 @@ tmv_t get_raw_delay(struct tsproc *tsp)

[Linuxptp-devel] [PATCH 04/13] tmv: Add missing uses of tmv_to_nanoseconds()

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- clock.c | 2 +- tsproc.c | 10 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/clock.c b/clock.c index 7af87fc..e9e5d74 100644 --- a/clock.c +++ b/clock.c @@ -419,7 +419,7 @@ static int

[Linuxptp-devel] [PATCH 06/13] tmv: Add tmv_sign()

2018-02-28 Thread Michael Brown
The sign of time values is tested in tsproc.c. Add an abstraction tmv_sign() to return the sign of a time value. Signed-off-by: Michael Brown --- tmv.h| 5 + tsproc.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tmv.h b/tmv.h index

[Linuxptp-devel] [PATCH 05/13] tmv: Generalise tmv_eq() to tmv_cmp()

2018-02-28 Thread Michael Brown
Time values are compared using an inequality test in mmedian.c Generalise tmv_eq() to tmv_cmp() (by analogy with memcmp()) and replace existing uses of tmv_eq(). Signed-off-by: Michael Brown --- clock.c | 2 +- mmedian.c | 3 ++- port.c| 2 +- tmv.h | 4 ++--

[Linuxptp-devel] [PATCH 07/13] tmv: Convert tmv_t to a non-scalar type

2018-02-28 Thread Michael Brown
Enforce the use of the tmv_t wrapper functions by converting tmv_t from an int64_t to a struct containing an int64_t. Signed-off-by: Michael Brown --- tmv.h | 47 --- 1 file changed, 32 insertions(+), 15 deletions(-) diff

[Linuxptp-devel] [PATCH 01/13] tmv: Add missing uses of tmv_zero()

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- mave.c | 2 +- tsproc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mave.c b/mave.c index fd09e5a..1a64f79 100644 --- a/mave.c +++ b/mave.c @@ -58,7 +58,7 @@ static void mave_reset(struct filter *filter)

[Linuxptp-devel] [PATCH 02/13] tmv: Add missing uses of tmv_is_zero()

2018-02-28 Thread Michael Brown
Signed-off-by: Michael Brown --- clock.c | 4 ++-- port.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clock.c b/clock.c index 4532664..7af87fc 100644 --- a/clock.c +++ b/clock.c @@ -581,7 +581,7 @@ static enum servo_state

Re: [Linuxptp-devel] connecting two devices clock via GPIO

2018-02-28 Thread Frantisek Rysanek
Just a short update along the lines of this thread: On top of the previous work on PPS input to i210, I've cobbled together a simple PLL synth with a 25MHz VCXO, good enough to take an external 10 MHz reference and "influence" the crystal on an i210 to run in step with the PPS. (I could as well