Thread (22 messages) 22 messages, 7 authors, 2023-12-01

Re: [PATCH v1 2/2] net: stmmac: Add NPCM support

From: Andrew Lunn <andrew@lunn.ch>
Date: 2023-11-21 16:01:28
Also in: linux-arm-kernel, linux-devicetree, lkml, openbmc

+void npcm_dwmac_pcs_init(struct npcm_dwmac *dwmac, struct device *dev,
+			 struct plat_stmmacenet_data *plat_dat)
+{
+	u16 val;
+
+	iowrite16((u16)(SR_MII_CTRL >> 9), dwmac->reg + IND_AC_BA_REG);
+	val = ioread16(dwmac->reg + PCS_SR_MII_CTRL_REG);
+	val |= PCS_RST;
+	iowrite16(val, dwmac->reg + PCS_SR_MII_CTRL_REG);
+
+	while (val & PCS_RST)
+		val = ioread16(dwmac->reg + PCS_SR_MII_CTRL_REG);
+
+	val &= ~(PCS_AN_ENABLE);
+	iowrite16(val, dwmac->reg + PCS_SR_MII_CTRL_REG);
+}
Is this a licensed PCS implementation? Or home grown? If its been
licensed from somebody, it maybe should live in driver/net/pcs, so
others can reuse it when they license the same core.

       Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help