OSDN Git Service

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)
commit520cf6002147281d1e7b522bb338416b623dcb93
tree8cf0d50590b7b653b641adef423094cbeadbe09b
parent5da202c88f8c355ad79bc2e8eb582e6d433060e7
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: 9a8a02c9d46d ("net: stmmac: Add Flexible PPS support")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/stmicro/stmmac/dwmac5.c