[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2UweBsUDvrU9keT@lunn.ch>
Date: Fri, 4 Nov 2022 16:32:08 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Sriranjani P <sriranjani.p@...sung.com>
Cc: peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
joabreu@...opsys.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, mcoquelin.stm32@...il.com,
richardcochran@...il.com, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Chandrasekar R <rcsekar@...sung.com>,
Suresh Siddha <ssiddha@...la.com>
Subject: Re: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
> For FSD SoC, a mux switch is needed between internal and external clocks.
> By default after reset internal clock is used but for receiving packets
> properly, external clock is needed. Mux switch to external clock happens
> only when the external clock is present.
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -3831,6 +3831,9 @@ static int __stmmac_open(struct net_device *dev,
> netif_tx_start_all_queues(priv->dev);
> stmmac_enable_all_dma_irq(priv);
>
> + if (priv->plat->rxmux_setup)
> + priv->plat->rxmux_setup(priv->plat->bsp_priv, true);
> +
> return 0;
>
> irq_error:
> @@ -3884,6 +3887,9 @@ static int stmmac_release(struct net_device *dev)
> struct stmmac_priv *priv = netdev_priv(dev);
> u32 chan;
>
> + if (priv->plat->rxmux_setup)
> + priv->plat->rxmux_setup(priv->plat->bsp_priv, false);
> +
Is this the code which is deciding if the external clock is present? So when somebody called
'ip link set eth42 up'?
Where is the external clock coming from?
Andrew
Powered by blists - more mailing lists