]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: fix disabling flexible PPS output
authorAntonio Borneo <antonio.borneo@st.com>
Mon, 7 Oct 2019 15:43:05 +0000 (17:43 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 9 Oct 2019 22:52:52 +0000 (15:52 -0700)
commit43a94021eff6bbd106529edf8c05bbbcc3a42d9e
tree8cf0d50590b7b653b641adef423094cbeadbe09b
parentb7c73329a74a925f3ff998dec83ea53bb5176c96
net: stmmac: fix disabling flexible PPS output

Accordingly to Synopsys documentation [1] and [2], when bit PPSEN0
in register MAC_PPS_CONTROL is set it selects the functionality
command in the same register, otherwise selects the functionality
control.
Command functionality is required to either enable (command 0x2)
and disable (command 0x5) the flexible PPS output, but the bit
PPSEN0 is currently set only for enabling.

Set the bit PPSEN0 to properly disable flexible PPS output.

Tested on STM32MP15x, based on dwmac 4.10a.

[1] DWC Ethernet QoS Databook 4.10a October 2014
[2] DWC Ethernet QoS Databook 5.00a September 2017

Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Fixes: 14776e3b568c ("net: stmmac: Add Flexible PPS support")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/stmicro/stmmac/dwmac5.c