diff options
author | Jonathan Lemon <jonathan.lemon@gmail.com> | 2022-02-28 23:39:57 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-02 20:51:21 +0300 |
commit | 90f8f4c0e3cebd541deaa45cf0e470bb9810dd4f (patch) | |
tree | a08d7c91f26d718065e83dd6e1acba11d1909539 /arch/mips/loongson64/pm.c | |
parent | 0b0e2ff10356e7e2ffd66ecdd6eee69a2f03449b (diff) | |
download | linux-90f8f4c0e3cebd541deaa45cf0e470bb9810dd4f.tar.xz |
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>
Diffstat (limited to 'arch/mips/loongson64/pm.c')
0 files changed, 0 insertions, 0 deletions