In preparation for merging the USB and DP configurations, add dedicated pointers for the DP serdes and tx tables to the configurations.
Unified · Split
| @@ -816,6 +816,11 @@ struct qmp_phy_cfg { · 815 unmodified lines | ||
| 816 | 816 | const struct qmp_phy_init_tbl *pcs_usb_tbl; |
| 817 | 817 | int pcs_usb_tbl_num; |
| 818 | 818 | |
| 819 | + const struct qmp_phy_init_tbl *dp_serdes_tbl; | |
| 820 | + int dp_serdes_tbl_num; | |
| 821 | + const struct qmp_phy_init_tbl *dp_tx_tbl; | |
| 822 | + int dp_tx_tbl_num; | |
| 823 | + | |
| 819 | 824 | /* Init sequence for DP PHY block link rates */ |
| 820 | 825 | const struct qmp_phy_init_tbl *serdes_tbl_rbr; |
| 821 | 826 | int serdes_tbl_rbr_num; |
| @@ -1030,10 +1035,10 @@ static const struct qmp_phy_cfg sc7180_dpphy_cfg = { · 208 unmodified lines | ||
| 1030 | 1035 | .type = PHY_TYPE_DP, |
| 1031 | 1036 | .lanes = 2, |
| 1032 | 1037 | |
| 1033 | − .serdes_tbl = qmp_v3_dp_serdes_tbl, | |
| 1034 | − .serdes_tbl_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl), | |
| 1035 | − .tx_tbl = qmp_v3_dp_tx_tbl, | |
| 1036 | − .tx_tbl_num = ARRAY_SIZE(qmp_v3_dp_tx_tbl), | |
| 1038 | + .dp_serdes_tbl = qmp_v3_dp_serdes_tbl, | |
| 1039 | + .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl), | |
| 1040 | + .dp_tx_tbl = qmp_v3_dp_tx_tbl, | |
| 1041 | + .dp_tx_tbl_num = ARRAY_SIZE(qmp_v3_dp_tx_tbl), | |
| 1037 | 1042 | |
| 1038 | 1043 | .serdes_tbl_rbr = qmp_v3_dp_serdes_tbl_rbr, |
| 1039 | 1044 | .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl_rbr), |
| @@ -1147,10 +1152,10 @@ static const struct qmp_phy_cfg sc8180x_dpphy_cfg = { · 107 unmodified lines | ||
| 1147 | 1152 | .type = PHY_TYPE_DP, |
| 1148 | 1153 | .lanes = 2, |
| 1149 | 1154 | |
| 1150 | − .serdes_tbl = qmp_v4_dp_serdes_tbl, | |
| 1151 | − .serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl), | |
| 1152 | − .tx_tbl = qmp_v4_dp_tx_tbl, | |
| 1153 | − .tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl), | |
| 1155 | + .dp_serdes_tbl = qmp_v4_dp_serdes_tbl, | |
| 1156 | + .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl), | |
| 1157 | + .dp_tx_tbl = qmp_v4_dp_tx_tbl, | |
| 1158 | + .dp_tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl), | |
| 1154 | 1159 | |
| 1155 | 1160 | .serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr, |
| 1156 | 1161 | .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr), |
| @@ -1203,10 +1208,10 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = { · 46 unmodified lines | ||
| 1203 | 1208 | .type = PHY_TYPE_DP, |
| 1204 | 1209 | .lanes = 2, |
| 1205 | 1210 | |
| 1206 | − .serdes_tbl = qmp_v5_dp_serdes_tbl, | |
| 1207 | − .serdes_tbl_num = ARRAY_SIZE(qmp_v5_dp_serdes_tbl), | |
| 1208 | − .tx_tbl = qmp_v5_5nm_dp_tx_tbl, | |
| 1209 | − .tx_tbl_num = ARRAY_SIZE(qmp_v5_5nm_dp_tx_tbl), | |
| 1211 | + .dp_serdes_tbl = qmp_v5_dp_serdes_tbl, | |
| 1212 | + .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v5_dp_serdes_tbl), | |
| 1213 | + .dp_tx_tbl = qmp_v5_5nm_dp_tx_tbl, | |
| 1214 | + .dp_tx_tbl_num = ARRAY_SIZE(qmp_v5_5nm_dp_tx_tbl), | |
| 1210 | 1215 | |
| 1211 | 1216 | .serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr, |
| 1212 | 1217 | .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr), |
| @@ -1263,10 +1268,10 @@ static const struct qmp_phy_cfg sm8250_dpphy_cfg = { · 50 unmodified lines | ||
| 1263 | 1268 | .type = PHY_TYPE_DP, |
| 1264 | 1269 | .lanes = 2, |
| 1265 | 1270 | |
| 1266 | − .serdes_tbl = qmp_v4_dp_serdes_tbl, | |
| 1267 | − .serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl), | |
| 1268 | − .tx_tbl = qmp_v4_dp_tx_tbl, | |
| 1269 | − .tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl), | |
| 1271 | + .dp_serdes_tbl = qmp_v4_dp_serdes_tbl, | |
| 1272 | + .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl), | |
| 1273 | + .dp_tx_tbl = qmp_v4_dp_tx_tbl, | |
| 1274 | + .dp_tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl), | |
| 1270 | 1275 | |
| 1271 | 1276 | .serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr, |
| 1272 | 1277 | .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr), |
| @@ -1324,10 +1329,8 @@ static int qmp_combo_dp_serdes_init(struct qmp_phy *qphy) · 51 unmodified lines | ||
| 1324 | 1329 | const struct qmp_phy_cfg *cfg = qphy->cfg; |
| 1325 | 1330 | void __iomem *serdes = qphy->dp_serdes; |
| 1326 | 1331 | const struct phy_configure_opts_dp *dp_opts = &qphy->dp_opts; |
| 1327 | − const struct qmp_phy_init_tbl *serdes_tbl = cfg->serdes_tbl; | |
| 1328 | − int serdes_tbl_num = cfg->serdes_tbl_num; | |
| 1329 | 1332 | |
| 1330 | − qmp_combo_configure(serdes, serdes_tbl, serdes_tbl_num); | |
| 1333 | + qmp_combo_configure(serdes, cfg->dp_serdes_tbl, cfg->dp_serdes_tbl_num); | |
| 1331 | 1334 | |
| 1332 | 1335 | switch (dp_opts->link_rate) { |
| 1333 | 1336 | case 1620: |
| @@ -2000,10 +2003,10 @@ static int qmp_combo_dp_power_on(struct phy *phy) · 666 unmodified lines | ||
| 2000 | 2003 | |
| 2001 | 2004 | qmp_combo_dp_serdes_init(qphy); |
| 2002 | 2005 | |
| 2003 | − qmp_combo_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1); | |
| 2006 | + qmp_combo_configure_lane(tx, cfg->dp_tx_tbl, cfg->dp_tx_tbl_num, 1); | |
| 2004 | 2007 | |
| 2005 | 2008 | if (cfg->lanes >= 2) |
| 2006 | − qmp_combo_configure_lane(qphy->dp_tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2); | |
| 2009 | + qmp_combo_configure_lane(qphy->dp_tx2, cfg->dp_tx_tbl, cfg->dp_tx_tbl_num, 2); | |
| 2007 | 2010 | |
| 2008 | 2011 | /* Configure special DP tx tunings */ |
| 2009 | 2012 | cfg->configure_dp_tx(qphy); |