]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: ti: icssg-prueth: Fix 1 PPS sync
authorMeghana Malladi <m-malladi@ti.com>
Mon, 11 Nov 2024 09:58:42 +0000 (15:28 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Nov 2024 09:34:56 +0000 (10:34 +0100)
commitdc065076ee7768377d7c16af7d1b0767782d8c98
treeaaa240082fa2c3383e94f9bff6ea56295cea3981
parent5b366eae71937ae7412365340b431064625f9617
net: ti: icssg-prueth: Fix 1 PPS sync

The first PPS latch time needs to be calculated by the driver
(in rounded off seconds) and configured as the start time
offset for the cycle. After synchronizing two PTP clocks
running as master/slave, missing this would cause master
and slave to start immediately with some milliseconds
drift which causes the PPS signal to never synchronize with
the PTP master.

Fixes: 186734c15886 ("net: ti: icssg-prueth: add packet timestamping and ptp support")
Signed-off-by: Meghana Malladi <m-malladi@ti.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Reviewed-by: MD Danish Anwar <danishanwar@ti.com>
Link: https://patch.msgid.link/20241111095842.478833-1-m-malladi@ti.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/ti/icssg/icssg_prueth.c
drivers/net/ethernet/ti/icssg/icssg_prueth.h