]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: mv88e6xxx: support 4000ps cycle counter period
authorShenghao Yang <me@shenghaoyang.info>
Sun, 20 Oct 2024 06:38:30 +0000 (14:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 01:02:38 +0000 (02:02 +0100)
commit27df05819f054442232f181658e5a576128b9fd8
treea92cab51885deea4456f4614921963782f6781d6
parentc3f3c814cab97a6cfb34dba2d3d34c5da472e9d2
net: dsa: mv88e6xxx: support 4000ps cycle counter period

[ Upstream commit 3e65ede526cf4f95636dbc835598d100c7668ab3 ]

The MV88E6393X family of devices can run its cycle counter off
an internal 250MHz clock instead of an external 125MHz one.

Add support for this cycle counter period by adding another set
of coefficients and lowering the periodic cycle counter read interval
to compensate for faster overflows at the increased frequency.

Otherwise, the PHC runs at 2x real time in userspace and cannot be
synchronized.

Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
Signed-off-by: Shenghao Yang <me@shenghaoyang.info>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mv88e6xxx/ptp.c