Lines Matching refs:ndev

19 static int sxgbe_xpcs_read(struct net_device *ndev, unsigned int reg)  in sxgbe_xpcs_read()  argument
22 struct sxgbe_priv_data *priv = netdev_priv(ndev); in sxgbe_xpcs_read()
29 static int sxgbe_xpcs_write(struct net_device *ndev, int reg, int data) in sxgbe_xpcs_write() argument
31 struct sxgbe_priv_data *priv = netdev_priv(ndev); in sxgbe_xpcs_write()
38 int sxgbe_xpcs_init(struct net_device *ndev) in sxgbe_xpcs_init() argument
42 value = sxgbe_xpcs_read(ndev, SR_PCS_MMD_CONTROL1); in sxgbe_xpcs_init()
44 sxgbe_xpcs_write(ndev, SR_PCS_CONTROL2, XPCS_TYPE_SEL_X); in sxgbe_xpcs_init()
45 sxgbe_xpcs_write(ndev, VR_PCS_MMD_XAUI_MODE_CONTROL, XPCS_XAUI_MODE); in sxgbe_xpcs_init()
46 sxgbe_xpcs_write(ndev, VR_PCS_MMD_XAUI_MODE_CONTROL, value | BIT(13)); in sxgbe_xpcs_init()
47 sxgbe_xpcs_write(ndev, SR_PCS_MMD_CONTROL1, value | BIT(11)); in sxgbe_xpcs_init()
50 value = sxgbe_xpcs_read(ndev, VR_PCS_MMD_DIGITAL_STATUS); in sxgbe_xpcs_init()
53 value = sxgbe_xpcs_read(ndev, SR_PCS_MMD_CONTROL1); in sxgbe_xpcs_init()
54 sxgbe_xpcs_write(ndev, SR_PCS_MMD_CONTROL1, value & ~BIT(11)); in sxgbe_xpcs_init()
57 value = sxgbe_xpcs_read(ndev, VR_PCS_MMD_DIGITAL_STATUS); in sxgbe_xpcs_init()
63 int sxgbe_xpcs_init_1G(struct net_device *ndev) in sxgbe_xpcs_init_1G() argument
68 sxgbe_xpcs_write(ndev, SR_PCS_CONTROL2, XPCS_TYPE_SEL_X); in sxgbe_xpcs_init_1G()
69 sxgbe_xpcs_write(ndev, VR_PCS_MMD_XAUI_MODE_CONTROL, XPCS_XAUI_MODE); in sxgbe_xpcs_init_1G()
70 value = sxgbe_xpcs_read(ndev, SR_PCS_MMD_CONTROL1); in sxgbe_xpcs_init_1G()
71 sxgbe_xpcs_write(ndev, SR_PCS_MMD_CONTROL1, value & ~BIT(13)); in sxgbe_xpcs_init_1G()
73 value = sxgbe_xpcs_read(ndev, SR_MII_MMD_CONTROL); in sxgbe_xpcs_init_1G()
74 sxgbe_xpcs_write(ndev, SR_MII_MMD_CONTROL, value | BIT(6)); in sxgbe_xpcs_init_1G()
75 sxgbe_xpcs_write(ndev, SR_MII_MMD_CONTROL, value & ~BIT(13)); in sxgbe_xpcs_init_1G()
76 value = sxgbe_xpcs_read(ndev, SR_PCS_MMD_CONTROL1); in sxgbe_xpcs_init_1G()
77 sxgbe_xpcs_write(ndev, SR_PCS_MMD_CONTROL1, value | BIT(11)); in sxgbe_xpcs_init_1G()
80 value = sxgbe_xpcs_read(ndev, VR_PCS_MMD_DIGITAL_STATUS); in sxgbe_xpcs_init_1G()
83 value = sxgbe_xpcs_read(ndev, SR_PCS_MMD_CONTROL1); in sxgbe_xpcs_init_1G()
84 sxgbe_xpcs_write(ndev, SR_PCS_MMD_CONTROL1, value & ~BIT(11)); in sxgbe_xpcs_init_1G()
87 value = sxgbe_xpcs_read(ndev, SR_MII_MMD_CONTROL); in sxgbe_xpcs_init_1G()
88 sxgbe_xpcs_write(ndev, SR_MII_MMD_CONTROL, value | BIT(12)); in sxgbe_xpcs_init_1G()