]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan966x: Update lan966x_ptp_get_nominal_value
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Sat, 9 Apr 2022 18:41:40 +0000 (20:41 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Apr 2022 03:47:15 +0000 (20:47 -0700)
commit77a5fc9f9c32fc97e81384d0a917c0e5e45d774d
treebc5f79476f4d838c0317babb4e48e1a1e6345128
parentc8d8b301a29602925474daf9a7a9723353312ae5
net: lan966x: Update lan966x_ptp_get_nominal_value

The clk_per_cfg register represents the value added to the system clock
for each clock cycle. The issue is that the default value is wrong,
meaning that in case the DUT was a grandmaster then everone in the
network was too slow. In case there was a grandmaster, then there is no
issue because the DUT will configure clk_per_cfg register based on the
master frequency.

Fixes: 0a2127c1781d98 ("net: lan966x: Add support for ptp clocks")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c