Re: [PATCH net-next 3/3] net: mdio: mdio-bcm-unimac: Add Clause 45 support

From
Florian Fainelli <florian.fainelli@broadcom.com>
Date
2026-11-13 22:14:17
Also in
lkml
Reply to
Andrew Lunn, 2026-11-13
On 11/13/26 14:04, Andrew Lunn wrote:
quoted
+static void unimac_mdio_set_clause(struct unimac_mdio_priv *priv, bool is_c45)
+{
+	u32 cfg = unimac_mdio_readl(priv, MDIO_CFG);
+	u32 new_cfg = cfg;
+
+	if (is_c45)
+		new_cfg &= ~MDIO_C22;
+	else
+		new_cfg |= MDIO_C22;
+
+	if (new_cfg != cfg)
+		unimac_mdio_writel(priv, new_cfg, MDIO_CFG);
Is the write expensive? The bus is not faster, so is this optimisation
even noticeable?
It's not really noticeable, with the firmware images that we have it saves roughly 30ms per firmware load per PHY, but it's a cheap optimization to carry, so I don't see why not?
-- 
Florian
Thread (13 messages) 13 messages, 4 authors, last reply 4h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help