* [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII
@ 2024-02-26 9:42 Sarosh Hasan
2024-02-26 23:39 ` Andrew Lunn
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sarosh Hasan @ 2024-02-26 9:42 UTC (permalink / raw)
To: Vinod Koul, Andy Gross, Bjorn Andersson, Konrad Dybcio,
David S. Miller, Eric Dumazet, Jakub Kicinski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alexandre Torgue, Jose Abreu,
Maxime Coquelin, netdev, linux-arm-msm, devicetree, linux-kernel,
linux-stm32, Prasad Sodagudi, Andrew Halaney, Rob Herring
Cc: kernel, Sneh Shah, Suraj Jaiswal
Updating link clock rate for different speeds is only needed when
using RGMII, as that mode requires changing clock speed when the link
speed changes. Let's restrict updating the link clock speed in
ethqos_update_link_clk() to just RGMII. Other modes such as SGMII
only need to enable the link clock (which is already done in probe).
Signed-off-by: Sarosh Hasan <quic_sarohasa@quicinc.com>
---
v2 changelog:
- Addressed Konrad Dybcio comment on optimizing the patch
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 31631e3f89d0..c182294a6515 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -169,6 +169,9 @@ static void rgmii_dump(void *priv)
static void
ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed)
{
+ if (!phy_interface_mode_is_rgmii(ethqos->phy_mode))
+ return;
+
switch (speed) {
case SPEED_1000:
ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII
2024-02-26 9:42 [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Sarosh Hasan
@ 2024-02-26 23:39 ` Andrew Lunn
2024-02-27 18:02 ` Andrew Halaney
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2024-02-26 23:39 UTC (permalink / raw)
To: Sarosh Hasan
Cc: Vinod Koul, Andy Gross, Bjorn Andersson, Konrad Dybcio,
David S. Miller, Eric Dumazet, Jakub Kicinski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alexandre Torgue, Jose Abreu,
Maxime Coquelin, netdev, linux-arm-msm, devicetree, linux-kernel,
linux-stm32, Prasad Sodagudi, Andrew Halaney, Rob Herring, kernel,
Sneh Shah, Suraj Jaiswal
On Mon, Feb 26, 2024 at 03:12:26PM +0530, Sarosh Hasan wrote:
> Updating link clock rate for different speeds is only needed when
> using RGMII, as that mode requires changing clock speed when the link
> speed changes. Let's restrict updating the link clock speed in
> ethqos_update_link_clk() to just RGMII. Other modes such as SGMII
> only need to enable the link clock (which is already done in probe).
>
> Signed-off-by: Sarosh Hasan <quic_sarohasa@quicinc.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII
2024-02-26 9:42 [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Sarosh Hasan
2024-02-26 23:39 ` Andrew Lunn
@ 2024-02-27 18:02 ` Andrew Halaney
2024-02-27 18:45 ` Abhishek Chauhan (ABC)
2024-02-28 11:30 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Andrew Halaney @ 2024-02-27 18:02 UTC (permalink / raw)
To: Sarosh Hasan
Cc: Vinod Koul, Andy Gross, Bjorn Andersson, Konrad Dybcio,
David S. Miller, Eric Dumazet, Jakub Kicinski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alexandre Torgue, Jose Abreu,
Maxime Coquelin, netdev, linux-arm-msm, devicetree, linux-kernel,
linux-stm32, Prasad Sodagudi, Rob Herring, kernel, Sneh Shah,
Suraj Jaiswal
On Mon, Feb 26, 2024 at 03:12:26PM +0530, Sarosh Hasan wrote:
> Updating link clock rate for different speeds is only needed when
> using RGMII, as that mode requires changing clock speed when the link
> speed changes. Let's restrict updating the link clock speed in
> ethqos_update_link_clk() to just RGMII. Other modes such as SGMII
> only need to enable the link clock (which is already done in probe).
>
> Signed-off-by: Sarosh Hasan <quic_sarohasa@quicinc.com>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride
> ---
> v2 changelog:
> - Addressed Konrad Dybcio comment on optimizing the patch
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 31631e3f89d0..c182294a6515 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -169,6 +169,9 @@ static void rgmii_dump(void *priv)
> static void
> ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed)
> {
> + if (!phy_interface_mode_is_rgmii(ethqos->phy_mode))
> + return;
> +
> switch (speed) {
> case SPEED_1000:
> ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ;
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII
2024-02-26 9:42 [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Sarosh Hasan
2024-02-26 23:39 ` Andrew Lunn
2024-02-27 18:02 ` Andrew Halaney
@ 2024-02-27 18:45 ` Abhishek Chauhan (ABC)
2024-02-28 11:30 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Abhishek Chauhan (ABC) @ 2024-02-27 18:45 UTC (permalink / raw)
To: Sarosh Hasan, Vinod Koul, Andy Gross, Bjorn Andersson,
Konrad Dybcio, David S. Miller, Eric Dumazet, Jakub Kicinski,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alexandre Torgue,
Jose Abreu, Maxime Coquelin, netdev, linux-arm-msm, devicetree,
linux-kernel, linux-stm32, Prasad Sodagudi, Andrew Halaney,
Rob Herring
Cc: kernel, Sneh Shah, Suraj Jaiswal
On 2/26/2024 1:42 AM, Sarosh Hasan wrote:
> Updating link clock rate for different speeds is only needed when
> using RGMII, as that mode requires changing clock speed when the link
> speed changes. Let's restrict updating the link clock speed in
> ethqos_update_link_clk() to just RGMII. Other modes such as SGMII
> only need to enable the link clock (which is already done in probe).
>
> Signed-off-by: Sarosh Hasan <quic_sarohasa@quicinc.com>
Reviewed-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
> ---
> v2 changelog:
> - Addressed Konrad Dybcio comment on optimizing the patch
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 31631e3f89d0..c182294a6515 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -169,6 +169,9 @@ static void rgmii_dump(void *priv)
> static void
> ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed)
> {
> + if (!phy_interface_mode_is_rgmii(ethqos->phy_mode))
> + return;
> +
> switch (speed) {
> case SPEED_1000:
> ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII
2024-02-26 9:42 [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Sarosh Hasan
` (2 preceding siblings ...)
2024-02-27 18:45 ` Abhishek Chauhan (ABC)
@ 2024-02-28 11:30 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-28 11:30 UTC (permalink / raw)
To: Sarosh Hasan
Cc: vkoul, agross, andersson, konrad.dybcio, davem, edumazet, kuba,
robh+dt, krzysztof.kozlowski+dt, conor+dt, alexandre.torgue,
joabreu, mcoquelin.stm32, netdev, linux-arm-msm, devicetree,
linux-kernel, linux-stm32, psodagud, ahalaney, robh, kernel,
quic_snehshah, quic_jsuraj
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Mon, 26 Feb 2024 15:12:26 +0530 you wrote:
> Updating link clock rate for different speeds is only needed when
> using RGMII, as that mode requires changing clock speed when the link
> speed changes. Let's restrict updating the link clock speed in
> ethqos_update_link_clk() to just RGMII. Other modes such as SGMII
> only need to enable the link clock (which is already done in probe).
>
> Signed-off-by: Sarosh Hasan <quic_sarohasa@quicinc.com>
>
> [...]
Here is the summary with links:
- [net-next,v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII
https://git.kernel.org/netdev/net-next/c/26311cd112d0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-28 11:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26 9:42 [PATCH net-next v2] net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII Sarosh Hasan
2024-02-26 23:39 ` Andrew Lunn
2024-02-27 18:02 ` Andrew Halaney
2024-02-27 18:45 ` Abhishek Chauhan (ABC)
2024-02-28 11:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).