]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: fix enabling socfpga's ptp_ref_clock
authorJulien Beraud <julien.beraud@orolia.com>
Wed, 15 Apr 2020 12:24:31 +0000 (14:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Apr 2020 22:02:18 +0000 (15:02 -0700)
commit1c15fb2bf7c5c83109802d8eebe46bca367e819c
treefd787b9946ff93ddf975756d9a9acb0aade4547b
parenta4da09904930c550b2d4f343fa28ec026ceb7997
net: stmmac: fix enabling socfpga's ptp_ref_clock

There are 2 registers to write to enable a ptp ref clock coming from the
fpga.
One that enables the usage of the clock from the fpga for emac0 and emac1
as a ptp ref clock, and the other to allow signals from the fpga to reach
emac0 and emac1.
Currently, if the dwmac-socfpga has phymode set to PHY_INTERFACE_MODE_MII,
PHY_INTERFACE_MODE_GMII, or PHY_INTERFACE_MODE_SGMII, both registers will
be written and the ptp ref clock will be set as coming from the fpga.
Separate the 2 register writes to only enable signals from the fpga to
reach emac0 or emac1 when ptp ref clock is not coming from the fpga.

Signed-off-by: Julien Beraud <julien.beraud@orolia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c