0x2d8, 0x2d8};
u8 rtpcs_930x_sds_submode_lsb[] = { 0, 5, 0, 5, 10, 15, 20, 25 };
-static void rtpcs_930x_sds_set(struct rtpcs_serdes *sds, u32 mode)
+static void __rtpcs_930x_sds_set_mac_mode(struct rtpcs_serdes *sds, u32 mode)
{
u8 sds_id = sds->id;
}
__always_unused
-static u32 rtpcs_930x_sds_mode_get(struct rtpcs_serdes *sds)
+static u32 __rtpcs_930x_sds_get_mac_mode(struct rtpcs_serdes *sds)
{
u8 sds_id = sds->id;
u32 v;
}
__always_unused
-static u32 rtpcs_930x_sds_submode_get(struct rtpcs_serdes *sds)
+static u32 __rtpcs_930x_sds_get_usxgmii_submode(struct rtpcs_serdes *sds)
{
u8 sds_id = sds->id;
u32 v;
return v & RTL930X_SDS_MASK;
}
-static void rtpcs_930x_sds_submode_set(struct rtpcs_serdes *sds,
- u32 submode)
+static void __rtpcs_930x_sds_set_usxgmii_submode(struct rtpcs_serdes *sds,
+ u32 submode)
{
u8 sds_id = sds->id;
return -EBUSY;
}
-static int rtpcs_930x_sds_get_internal_mode(struct rtpcs_serdes *sds)
+static int __rtpcs_930x_sds_get_ip_mode(struct rtpcs_serdes *sds)
{
return rtpcs_sds_read_bits(sds, 0x1f, 0x09, 11, 7);
}
-static void rtpcs_930x_sds_set_internal_mode(struct rtpcs_serdes *sds, int mode)
+static void __rtpcs_930x_sds_set_ip_mode(struct rtpcs_serdes *sds, int mode)
{
rtpcs_sds_write_bits(sds, 0x1f, 0x09, 6, 6, 0x1); /* Force mode enable */
rtpcs_sds_write_bits(sds, 0x1f, 0x09, 11, 7, mode);
{
int mode, tmp, speed;
- mode = rtpcs_930x_sds_get_internal_mode(sds);
+ mode = __rtpcs_930x_sds_get_ip_mode(sds);
rtpcs_930x_sds_get_pll_data(sds, &tmp, &speed);
rtpcs_930x_sds_set_power(sds, false);
- rtpcs_930x_sds_set_internal_mode(sds, RTL930X_SDS_OFF);
+ __rtpcs_930x_sds_set_ip_mode(sds, RTL930X_SDS_OFF);
rtpcs_930x_sds_set_pll_data(sds, pll, speed);
rtpcs_930x_sds_reset_cmu(sds);
- rtpcs_930x_sds_set_internal_mode(sds, mode);
+ __rtpcs_930x_sds_set_ip_mode(sds, mode);
if (rtpcs_930x_sds_wait_clock_ready(sds))
pr_err("%s: SDS %d could not sync clock\n", __func__, sds->id);
* the state of a SerDes back to RTL930X_SDS_OFF is not (yet) implemented.
*/
- neighbor_mode = rtpcs_930x_sds_get_internal_mode(nb_sds);
+ neighbor_mode = __rtpcs_930x_sds_get_ip_mode(nb_sds);
rtpcs_930x_sds_get_pll_data(nb_sds, &neighbor_pll, &neighbor_speed);
if ((hw_mode == RTPCS_SDS_MODE_1000BASEX) ||
}
rtpcs_930x_sds_set_power(sds, false);
- rtpcs_930x_sds_set_internal_mode(sds, RTL930X_SDS_OFF);
+ __rtpcs_930x_sds_set_ip_mode(sds, RTL930X_SDS_OFF);
if (hw_mode == RTPCS_SDS_MODE_OFF)
return;
pr_err("%s: SDS %d could not configure PLL for mode %d\n", __func__,
sds->id, hw_mode);
- rtpcs_930x_sds_set_internal_mode(sds, mode_val);
+ __rtpcs_930x_sds_set_ip_mode(sds, mode_val);
if (rtpcs_930x_sds_wait_clock_ready(sds))
pr_err("%s: SDS %d could not sync clock\n", __func__, sds->id);
}
/* SerDes off first. */
- rtpcs_930x_sds_set(sds, RTL930X_SDS_OFF);
+ __rtpcs_930x_sds_set_mac_mode(sds, RTL930X_SDS_OFF);
/* Set the mode. */
- rtpcs_930x_sds_set(sds, mode_val);
+ __rtpcs_930x_sds_set_mac_mode(sds, mode_val);
/* Set the submode if needed. */
if (hw_mode == RTPCS_SDS_MODE_USXGMII_10GQXGMII)
- rtpcs_930x_sds_submode_set(sds, submode_val);
+ __rtpcs_930x_sds_set_usxgmii_submode(sds, submode_val);
}
static void rtpcs_930x_sds_tx_config(struct rtpcs_serdes *sds,
}
/* Turn Off Serdes */
- rtpcs_930x_sds_set(sds, RTL930X_SDS_OFF);
+ __rtpcs_930x_sds_set_mac_mode(sds, RTL930X_SDS_OFF);
/* Apply serdes patches */
rtpcs_930x_sds_patch(sds, hw_mode);