From: Antonio Borneo <antonio.borneo@st.com> To: Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org> Cc: Antonio Borneo <antonio.borneo@st.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH] net: stmmac: fix disabling flexible PPS output Date: Mon, 7 Oct 2019 17:43:05 +0200 [thread overview] Message-ID: <20191007154306.95827-4-antonio.borneo@st.com> (raw) In-Reply-To: <20191007154306.95827-1-antonio.borneo@st.com> 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") --- drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c index 3f4f3132e16b..e436fa160c7d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c @@ -515,6 +515,7 @@ int dwmac5_flex_pps_config(void __iomem *ioaddr, int index, if (!enable) { val |= PPSCMDx(index, 0x5); + val |= PPSEN0; writel(val, ioaddr + MAC_PPS_CONTROL); return 0; } -- 2.23.0
WARNING: multiple messages have this Message-ID (diff)
From: Antonio Borneo <antonio.borneo@st.com> To: Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org> Cc: Antonio Borneo <antonio.borneo@st.com>, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin <mcoquelin.stm32@gmail.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH] net: stmmac: fix disabling flexible PPS output Date: Mon, 7 Oct 2019 17:43:05 +0200 [thread overview] Message-ID: <20191007154306.95827-4-antonio.borneo@st.com> (raw) In-Reply-To: <20191007154306.95827-1-antonio.borneo@st.com> 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") --- drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c index 3f4f3132e16b..e436fa160c7d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c @@ -515,6 +515,7 @@ int dwmac5_flex_pps_config(void __iomem *ioaddr, int index, if (!enable) { val |= PPSCMDx(index, 0x5); + val |= PPSEN0; writel(val, ioaddr + MAC_PPS_CONTROL); return 0; } -- 2.23.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-10-07 15:43 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-07 15:43 [PATCH] ptp: fix typo of "mechanism" in Kconfig help text Antonio Borneo 2019-10-07 15:43 ` [PATCH] staging: rtl8723bs: fix typo of "mechanism" in comment Antonio Borneo 2019-10-07 15:43 ` Antonio Borneo 2019-10-07 15:43 ` [PATCH] net: stmmac: fix length of PTP clock's name string Antonio Borneo 2019-10-07 15:43 ` Antonio Borneo 2019-10-09 23:10 ` Jakub Kicinski 2019-10-09 23:10 ` Jakub Kicinski 2019-10-07 15:43 ` Antonio Borneo [this message] 2019-10-07 15:43 ` [PATCH] net: stmmac: fix disabling flexible PPS output Antonio Borneo 2019-10-09 23:10 ` Jakub Kicinski 2019-10-09 23:10 ` Jakub Kicinski 2019-10-07 15:43 ` [PATCH] net: stmmac: add flexible PPS to dwmac 4.10a Antonio Borneo 2019-10-07 15:43 ` Antonio Borneo 2019-10-09 22:26 ` Jakub Kicinski 2019-10-09 22:26 ` Jakub Kicinski 2020-11-24 14:15 ` Ahmad Fatoum 2020-11-24 14:15 ` Ahmad Fatoum 2020-11-24 14:23 ` Antonio Borneo 2020-11-24 14:23 ` Antonio Borneo 2020-11-24 18:20 ` Jakub Kicinski 2020-11-24 18:20 ` Jakub Kicinski 2020-11-24 18:27 ` Antonio Borneo 2020-11-24 18:27 ` Antonio Borneo 2020-11-24 18:56 ` Jakub Kicinski 2020-11-24 18:56 ` Jakub Kicinski 2020-11-24 14:27 ` Ahmad Fatoum 2020-11-24 14:27 ` Ahmad Fatoum 2020-11-24 22:37 ` [PATCH] net: stmmac: fix incorrect merge of patch upstream Antonio Borneo 2020-11-24 22:37 ` Antonio Borneo 2020-11-25 10:55 ` Ahmad Fatoum 2020-11-25 10:55 ` Ahmad Fatoum 2020-11-25 19:26 ` Jakub Kicinski 2020-11-25 19:26 ` Jakub Kicinski 2019-10-07 19:04 ` [PATCH] ptp: fix typo of "mechanism" in Kconfig help text David Miller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191007154306.95827-4-antonio.borneo@st.com \ --to=antonio.borneo@st.com \ --cc=alexandre.torgue@st.com \ --cc=davem@davemloft.net \ --cc=joabreu@synopsys.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=peppe.cavallaro@st.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.