+ default:
+ break;
+ }
+ }
+ sw_w32(v, RTL930X_SMI_MAC_TYPE_CTRL);
+
+ // Set the private polling mask for all Realtek PHYs (i.e. not the 10GBit Aquantia ones)
+ sw_w32(private_poll_mask, RTL930X_SMI_PRVTE_POLLING_CTRL);
+
+ /* The following magic values are found in the port configuration, they seem to
+ * define different ways of polling a PHY. The below is for the Aquantia PHYs of
+ * the XGS1250 and the RTL8226 of the XGS1210 */
+ if (uses_usxgmii) {
+ sw_w32(0x01010000, RTL930X_SMI_10GPHY_POLLING_REG0_CFG);
+ sw_w32(0x01E7C400, RTL930X_SMI_10GPHY_POLLING_REG9_CFG);
+ sw_w32(0x01E7E820, RTL930X_SMI_10GPHY_POLLING_REG10_CFG);
+ }
+ if (uses_hisgmii) {
+ sw_w32(0x011FA400, RTL930X_SMI_10GPHY_POLLING_REG0_CFG);
+ sw_w32(0x013FA412, RTL930X_SMI_10GPHY_POLLING_REG9_CFG);
+ sw_w32(0x017FA414, RTL930X_SMI_10GPHY_POLLING_REG10_CFG);
+ }
+
+ pr_debug("%s: RTL930X_SMI_GLB_CTRL %08x\n", __func__,
+ sw_r32(RTL930X_SMI_GLB_CTRL));
+ pr_debug("%s: RTL930X_SMI_PORT0_15_POLLING_SEL %08x\n", __func__,
+ sw_r32(RTL930X_SMI_PORT0_15_POLLING_SEL));
+ pr_debug("%s: RTL930X_SMI_PORT16_27_POLLING_SEL %08x\n", __func__,
+ sw_r32(RTL930X_SMI_PORT16_27_POLLING_SEL));
+ pr_debug("%s: RTL930X_SMI_MAC_TYPE_CTRL %08x\n", __func__,
+ sw_r32(RTL930X_SMI_MAC_TYPE_CTRL));
+ pr_debug("%s: RTL930X_SMI_10GPHY_POLLING_REG0_CFG %08x\n", __func__,
+ sw_r32(RTL930X_SMI_10GPHY_POLLING_REG0_CFG));
+ pr_debug("%s: RTL930X_SMI_10GPHY_POLLING_REG9_CFG %08x\n", __func__,
+ sw_r32(RTL930X_SMI_10GPHY_POLLING_REG9_CFG));
+ pr_debug("%s: RTL930X_SMI_10GPHY_POLLING_REG10_CFG %08x\n", __func__,
+ sw_r32(RTL930X_SMI_10GPHY_POLLING_REG10_CFG));
+ pr_debug("%s: RTL930X_SMI_PRVTE_POLLING_CTRL %08x\n", __func__,
+ sw_r32(RTL930X_SMI_PRVTE_POLLING_CTRL));