realtek: pcs: rtl930x: decommission temporary helper
Decommission a helper for applying config/patch sequences for even/odd SerDes. Most of these sequences were squashed due to marginal difference, sharing a lot of common parts. For the marginal differences, testing showed that the different values were already present on even/odd. Since those are no reset/trigger bits but just configuration values, writing them for both should do no harm. Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22582 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
3bfc6378e8
commit
6425d0f0c6
@ -2818,9 +2818,6 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd
|
||||
|
||||
apply_fn = is_xsgmii ? rtpcs_sds_apply_config_xsg : rtpcs_sds_apply_config;
|
||||
|
||||
#define APPLY_EO(sds, is_even, e, o) \
|
||||
apply_fn(sds, (is_even) ? (e) : (o), (is_even) ? ARRAY_SIZE(e) : ARRAY_SIZE(o))
|
||||
|
||||
/* USXGMII-QX broken, rely on bootloader setup */
|
||||
if (hw_mode == RTPCS_SDS_MODE_USXGMII_10GQXGMII)
|
||||
return 0;
|
||||
@ -2895,12 +2892,16 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd
|
||||
return 0;
|
||||
}
|
||||
|
||||
APPLY_EO(sds, is_even_sds, rtpcs_930x_sds_cfg_final_even, rtpcs_930x_sds_cfg_final_odd);
|
||||
if (is_even_sds)
|
||||
apply_fn(sds, rtpcs_930x_sds_cfg_final_even,
|
||||
ARRAY_SIZE(rtpcs_930x_sds_cfg_final_even));
|
||||
else
|
||||
apply_fn(sds, rtpcs_930x_sds_cfg_final_odd,
|
||||
ARRAY_SIZE(rtpcs_930x_sds_cfg_final_odd));
|
||||
|
||||
if (hw_mode == RTPCS_SDS_MODE_10GBASER && is_even_sds)
|
||||
rtpcs_sds_write(sds, 0x2F, 0x1D, 0x76E1);
|
||||
|
||||
#undef APPLY_EO
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user