Thread (1 message) 1 message, 1 author, 2017-12-13

Re: [PATCHv2 2/3] net: socionext: Add Synquacer NetSec driver

From: Jassi Brar <hidden>
Date: 2017-12-13 15:46:51
Also in: linux-devicetree

On Wed, Dec 13, 2017 at 2:18 AM, Andrew Lunn [off-list ref] wrote:
quoted
quoted
+static int netsec_mac_update_to_phy_state(struct netsec_priv *priv)
+{
+       struct phy_device *phydev = priv->ndev->phydev;
+       u32 value = 0;
+
+       value = phydev->duplex ? NETSEC_GMAC_MCR_REG_FULL_DUPLEX_COMMON :
+                                NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON;
+
+       if (phydev->speed != SPEED_1000)
+               value |= NETSEC_MCR_PS;
+
+       if (priv->phy_interface != PHY_INTERFACE_MODE_GMII &&
+           phydev->speed == SPEED_100)
+               value |= NETSEC_GMAC_MCR_REG_FES;
+
+       value |= NETSEC_GMAC_MCR_REG_CST | NETSEC_GMAC_MCR_REG_JE;
+
+       if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII)
+               value |= NETSEC_GMAC_MCR_REG_IBN;
phy_interface_mode_is_rgmii() ??
Yes, thank you.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help