Thread (16 messages) 16 messages, 3 authors, 2022-11-16

Re: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support

From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-11-04 15:32:38
Also in: lkml, netdev

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.
quoted hunk ↗ jump to hunk
+++ 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help