]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: mv88e6xxx: read cycle counter period from hardware
authorShenghao Yang <me@shenghaoyang.info>
Sun, 20 Oct 2024 06:38:29 +0000 (14:38 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 24 Oct 2024 10:57:46 +0000 (12:57 +0200)
commit7e3c18097a709e9b958e721066e5fe76e563739b
tree5d841ea82f1c3078f51176d25ecc3ddfa17ace35
parent67af86afff74c914944374a103c04e4d9868dd15
net: dsa: mv88e6xxx: read cycle counter period from hardware

Instead of relying on a fixed mapping of hardware family to cycle
counter frequency, pull this information from the
MV88E6XXX_TAI_CLOCK_PERIOD register.

This lets us support switches whose cycle counter frequencies depend on
board design.

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