Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: qcom: qmp-usb-legacy: drop single-lane support

All PHYs supported by usb-legacy have two lanes. Drop support for
single-lane configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad DYbcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240126-phy-qmp-merge-common-v2-1-a463d0b57836@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Dmitry Baryshkov and committed by
Vinod Koul
982f92d5 80082fc8

+9 -28
+9 -28
drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
··· 507 507 508 508 /* struct qmp_phy_cfg - per-PHY initialization config */ 509 509 struct qmp_phy_cfg { 510 - int lanes; 511 - 512 510 const struct qmp_usb_legacy_offsets *offsets; 513 511 514 512 /* Init sequence for PHY blocks - serdes, tx, rx, pcs */ ··· 619 621 }; 620 622 621 623 static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = { 622 - .lanes = 2, 623 - 624 624 .serdes_tbl = qmp_v3_usb3_serdes_tbl, 625 625 .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl), 626 626 .tx_tbl = qmp_v3_usb3_tx_tbl, ··· 637 641 }; 638 642 639 643 static const struct qmp_phy_cfg sc7180_usb3phy_cfg = { 640 - .lanes = 2, 641 - 642 644 .serdes_tbl = qmp_v3_usb3_serdes_tbl, 643 645 .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl), 644 646 .tx_tbl = qmp_v3_usb3_tx_tbl, ··· 655 661 }; 656 662 657 663 static const struct qmp_phy_cfg sm8150_usb3phy_cfg = { 658 - .lanes = 2, 659 - 660 664 .serdes_tbl = sm8150_usb3_serdes_tbl, 661 665 .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl), 662 666 .tx_tbl = sm8150_usb3_tx_tbl, ··· 676 684 }; 677 685 678 686 static const struct qmp_phy_cfg sm8250_usb3phy_cfg = { 679 - .lanes = 2, 680 - 681 687 .serdes_tbl = sm8150_usb3_serdes_tbl, 682 688 .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl), 683 689 .tx_tbl = sm8250_usb3_tx_tbl, ··· 697 707 }; 698 708 699 709 static const struct qmp_phy_cfg sm8350_usb3phy_cfg = { 700 - .lanes = 2, 701 - 702 710 .serdes_tbl = sm8150_usb3_serdes_tbl, 703 711 .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl), 704 712 .tx_tbl = sm8350_usb3_tx_tbl, ··· 862 874 qmp_usb_legacy_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1); 863 875 qmp_usb_legacy_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1); 864 876 865 - if (cfg->lanes >= 2) { 866 - qmp_usb_legacy_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2); 867 - qmp_usb_legacy_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2); 868 - } 877 + qmp_usb_legacy_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2); 878 + qmp_usb_legacy_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2); 869 879 870 880 qmp_usb_legacy_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num); 871 881 ··· 1217 1231 if (cfg->pcs_usb_offset) 1218 1232 qmp->pcs_usb = qmp->pcs + cfg->pcs_usb_offset; 1219 1233 1220 - if (cfg->lanes >= 2) { 1221 - qmp->tx2 = devm_of_iomap(dev, np, 3, NULL); 1222 - if (IS_ERR(qmp->tx2)) 1223 - return PTR_ERR(qmp->tx2); 1234 + qmp->tx2 = devm_of_iomap(dev, np, 3, NULL); 1235 + if (IS_ERR(qmp->tx2)) 1236 + return PTR_ERR(qmp->tx2); 1224 1237 1225 - qmp->rx2 = devm_of_iomap(dev, np, 4, NULL); 1226 - if (IS_ERR(qmp->rx2)) 1227 - return PTR_ERR(qmp->rx2); 1238 + qmp->rx2 = devm_of_iomap(dev, np, 4, NULL); 1239 + if (IS_ERR(qmp->rx2)) 1240 + return PTR_ERR(qmp->rx2); 1228 1241 1229 - qmp->pcs_misc = devm_of_iomap(dev, np, 5, NULL); 1230 - } else { 1231 - qmp->pcs_misc = devm_of_iomap(dev, np, 3, NULL); 1232 - } 1233 - 1242 + qmp->pcs_misc = devm_of_iomap(dev, np, 5, NULL); 1234 1243 if (IS_ERR(qmp->pcs_misc)) { 1235 1244 dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); 1236 1245 qmp->pcs_misc = NULL;