Commit 68c52df82bb7b08df5b64e4e40338b6457aa5609

Authored by Murali Karicheri
Committed by Sekhar Nori
1 parent f341ec3bbc

phy: keystone: remove hyperlink support

Hyperlink is not supported by the driver. So remove all code related
to hyperlink.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
[nsekhar@ti.com: adjust subject line]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>

Showing 1 changed file with 0 additions and 113 deletions Side-by-side Diff

drivers/phy/phy-keystone-serdes.c
... ... @@ -438,16 +438,6 @@
438 438 FINSR(sc->regs, LANEX_REG(lane, 0x98), 0, 0, 0x1);
439 439 }
440 440  
441   -static void kserdes_phya_lane_patch(struct kserdes_config *sc, u32 lane)
442   -{
443   - FINSR(sc->regs, LANEX_REG(lane, 0x18), 25, 24, 0x2);
444   - FINSR(sc->regs, LANEX_REG(lane, 0x18), 27, 26, 0x2);
445   - FINSR(sc->regs, LANEX_REG(lane, 0x14), 15, 13, 0x1);
446   - FINSR(sc->regs, LANEX_REG(lane, 0x4c), 19, 16, 0xf);
447   - FINSR(sc->regs, LANEX_REG(lane, 0x4c), 23, 20, 0xa);
448   - FINSR(sc->regs, LANEX_REG(lane, 0x78), 30, 24, 0x7f);
449   -}
450   -
451 441 static void kserdes_phyb_patch(struct kserdes_config *sc)
452 442 {
453 443 int lane;
... ... @@ -481,9 +471,6 @@
481 471  
482 472 if (sc->phy_type == KSERDES_PHY_XGE) {
483 473 kserdes_phyb_patch(sc);
484   - } else if (sc->link_rate >= KSERDES_LINK_RATE_9P8304G) {
485   - for_each_enable_lane(sc, lane)
486   - kserdes_phya_lane_patch(sc, lane);
487 474 }
488 475  
489 476 /* Set ATT and BOOST start values for each lane */
... ... @@ -491,11 +478,6 @@
491 478 kserdes_set_lane_starts(sc, lane);
492 479 }
493 480  
494   -static inline void _kserdes_set_training_pattern(void __iomem *sregs)
495   -{
496   - FINSR(sregs, CML_REG(0xc8), 5, 0, 0x0f);
497   -}
498   -
499 481 static void kserdes_set_lane_overrides(struct kserdes_config *sc, u32 lane)
500 482 {
501 483 u32 val_0, val_1, val;
... ... @@ -1229,90 +1211,6 @@
1229 1211 usleep_range(10, 20);
1230 1212 }
1231 1213  
1232   -static void kserdes_override_tap_offsets(struct kserdes_config *sc, u32 lane)
1233   -{
1234   - u32 tap1val, tap2val, tap3val, tap4val, tap5val;
1235   - void __iomem *sregs = sc->regs;
1236   - u32 cmp, tap1_ofs;
1237   -
1238   - for_each_comparator(cmp) {
1239   - /*
1240   - * adjust taps only for center comparators of
1241   - * of conparator 1 and 3
1242   - */
1243   - if (!(cmp & 0x1))
1244   - continue;
1245   -
1246   - /* set comparator number */
1247   - FINSR(sregs, CML_REG(0x8c), 23, 21, cmp);
1248   -
1249   - /* read offsets */
1250   - FINSR(sregs, CMU0_REG(0x8), 31, 24, ((lane + 1) << 5) + 0x12);
1251   - tap1_ofs = (_kserdes_read_tbus_val(sregs) & 0x000f) << 3;
1252   -
1253   - FINSR(sregs, CMU0_REG(0x8), 31, 24, ((lane + 1) << 5) + 0x13);
1254   - tap1_ofs |= (_kserdes_read_tbus_val(sregs) & 0x0e00) >> 9;
1255   -
1256   - tap1val = tap1_ofs - 14;
1257   - tap2val = 31;
1258   - tap3val = 31;
1259   - tap4val = 31;
1260   - tap5val = 31;
1261   -
1262   - /* set dfe_shadow_lane_sel */
1263   - FINSR(sregs, CML_REG(0xf0), 27, 26, lane + 1);
1264   - /* Set rxeq_ovr_en to 0x1 */
1265   - FINSR(sregs, LANEX_REG(lane, 0x2c), 2, 2, 0x1);
1266   - /* set rxeq_dfe_cmp_sel_ovr to comp_no */
1267   - FINSR(sregs, LANEX_REG(lane, 0x30), 7, 5, cmp);
1268   - /* set dfe_tap_ovr_en to 1 */
1269   - FINSR(sregs, LANEX_REG(lane, 0x5c), 31, 31, 0x1);
1270   -
1271   - /* set tap overrides */
1272   - FINSR(sregs, LANEX_REG(lane, 0x58), 30, 24, tap1val);
1273   - FINSR(sregs, LANEX_REG(lane, 0x5c), 6, 0, tap2val);
1274   - FINSR(sregs, LANEX_REG(lane, 0x5c), 13, 8, tap3val);
1275   - FINSR(sregs, LANEX_REG(lane, 0x5c), 21, 16, tap4val);
1276   - FINSR(sregs, LANEX_REG(lane, 0x5c), 29, 24, tap5val);
1277   -
1278   - /* set rxeq_ovr_latch_o = 0x1 */
1279   - FINSR(sregs, LANEX_REG(lane, 0x2c), 10, 10, 0x1);
1280   - /* set rxeq_ovr_latch_o = 0x0 */
1281   - FINSR(sregs, LANEX_REG(lane, 0x2c), 10, 10, 0x0);
1282   -
1283   - /* set rxeq_ovr_en to 0 */
1284   - FINSR(sregs, LANEX_REG(lane, 0x2c), 2, 2, 0x0);
1285   - /* set dfe_tap_ovr_en to 0 */
1286   - FINSR(sregs, LANEX_REG(lane, 0x5c), 31, 31, 0x0);
1287   -
1288   - /*
1289   - * This part of code will latch in offsets to
1290   - * tap adaptation logic so that if adaptation
1291   - * occurs, it will pick these offsets
1292   - */
1293   - /* enable overrides */
1294   - FINSR(sregs, LANEX_REG(lane, 0x58), 16, 16, 0x1);
1295   - FINSR(sregs, LANEX_REG(lane, 0x48), 16, 16, 0x1);
1296   -
1297   - /* set gcfsm_cmp_sel to comp_no */
1298   - FINSR(sregs, LANEX_REG(lane, 0x4c), 5, 2, (0x1 << (cmp - 1)));
1299   - /* enable tap offset calibrate */
1300   - FINSR(sregs, LANEX_REG(lane, 0x58), 17, 17, 0x1);
1301   -
1302   - /* enable taps */
1303   - _kserdes_override_tap_offset_cdfe(sregs, lane, 1, 7, tap1val);
1304   - _kserdes_override_tap_offset_cdfe(sregs, lane, 2, 6, tap2val);
1305   - _kserdes_override_tap_offset_cdfe(sregs, lane, 3, 6, tap3val);
1306   - _kserdes_override_tap_offset_cdfe(sregs, lane, 4, 6, tap4val);
1307   - _kserdes_override_tap_offset_cdfe(sregs, lane, 5, 6, tap5val);
1308   -
1309   - /* Disable overrides */
1310   - FINSR(sregs, LANEX_REG(lane, 0x58), 16, 16, 0x0);
1311   - FINSR(sregs, LANEX_REG(lane, 0x48), 16, 16, 0x0);
1312   - FINSR(sregs, LANEX_REG(lane, 0x58), 17, 17, 0x0);
1313   - }
1314   -}
1315   -
1316 1214 static int kserdes_wait_lane_rx_valid(struct kserdes_config *sc, u32 lane)
1317 1215 {
1318 1216 unsigned long timeout = jiffies + msecs_to_jiffies(500);
... ... @@ -1520,9 +1418,6 @@
1520 1418 for_each_enable_lane(sc, i)
1521 1419 lanes_enable |= (1 << i);
1522 1420  
1523   - if (sc->link_rate >= KSERDES_LINK_RATE_9P8304G)
1524   - kserdes_tap1_patch(sc);
1525   -
1526 1421 /*
1527 1422 * disable transmitter on all lanes to prevent
1528 1423 * receiver from adapting
... ... @@ -1533,9 +1428,6 @@
1533 1428 /* apply highspeed config for link rates greater than 8Gbaud */
1534 1429 kserdes_phy_patch(sc);
1535 1430  
1536   - if (sc->phy_type == KSERDES_PHY_HYPERLINK)
1537   - _kserdes_set_training_pattern(sc->regs);
1538   -
1539 1431 /* assert serdes reset */
1540 1432 kserdes_assert_reset(sc);
1541 1433  
... ... @@ -1570,11 +1462,6 @@
1570 1462  
1571 1463 /* Apply tx termination */
1572 1464 kserdes_set_tx_terminations(sc, val);
1573   -
1574   - if (sc->link_rate >= KSERDES_LINK_RATE_9P8304G) {
1575   - for_each_enable_lane(sc, i)
1576   - kserdes_override_tap_offsets(sc, i);
1577   - }
1578 1465  
1579 1466 /* enable transmitter on all lanes */
1580 1467 for_each_enable_lane(sc, i)