Home
last modified time | relevance | path

Searched hist:"90 f8f4c0e3cebd541deaa45cf0e470bb9810dd4f" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/ptp/
H A Dptp_ocp.cdiff 90f8f4c0e3cebd541deaa45cf0e470bb9810dd4f Mon Feb 28 14:39:57 CST 2022 Jonathan Lemon <jonathan.lemon@gmail.com> ptp: ocp: Add ptp_ocp_adjtime_coarse for large adjustments

In ("ptp: ocp: Have FPGA fold in ns adjustment for adjtime."), the
ns adjustment was written to the FPGA register, so the clock could
accurately perform adjustments.

However, the adjtime() call passes in a s64, while the clock adjustment
registers use a s32. When trying to perform adjustments with a large
value (37 sec), things fail.

Examine the incoming delta, and if larger than 1 sec, use the original
(coarse) adjustment method. If smaller than 1 sec, then allow the
FPGA to fold in the changes over a 1 second window.

Fixes: 6d59d4fa1789 ("ptp: ocp: Have FPGA fold in ns adjustment for adjtime.")
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/20220228203957.367371-1-jonathan.lemon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>