提交 f8b64114 编写于 作者: J Johan Hovold 提交者: Vinod Koul

phy: qcom-qmp-pcie: clean up PHY lane init

Clean up the PHY lane initialisation somewhat by adding further
temporary variables and programming both tx and rx for the second lane
after the first lane.
Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: NJohan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20221105145939.20318-8-johan+linaro@kernel.orgSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 63bf101a
...@@ -1835,18 +1835,19 @@ static void qmp_pcie_lanes_init(struct qmp_pcie *qmp, const struct qmp_phy_cfg_t ...@@ -1835,18 +1835,19 @@ static void qmp_pcie_lanes_init(struct qmp_pcie *qmp, const struct qmp_phy_cfg_t
const struct qmp_phy_cfg *cfg = qmp->cfg; const struct qmp_phy_cfg *cfg = qmp->cfg;
void __iomem *tx = qmp->tx; void __iomem *tx = qmp->tx;
void __iomem *rx = qmp->rx; void __iomem *rx = qmp->rx;
void __iomem *tx2 = qmp->tx2;
void __iomem *rx2 = qmp->rx2;
if (!tables) if (!tables)
return; return;
qmp_pcie_configure_lane(tx, tables->tx, tables->tx_num, 1); qmp_pcie_configure_lane(tx, tables->tx, tables->tx_num, 1);
if (cfg->lanes >= 2)
qmp_pcie_configure_lane(qmp->tx2, tables->tx, tables->tx_num, 2);
qmp_pcie_configure_lane(rx, tables->rx, tables->rx_num, 1); qmp_pcie_configure_lane(rx, tables->rx, tables->rx_num, 1);
if (cfg->lanes >= 2)
qmp_pcie_configure_lane(qmp->rx2, tables->rx, tables->rx_num, 2); if (cfg->lanes >= 2) {
qmp_pcie_configure_lane(tx2, tables->tx, tables->tx_num, 2);
qmp_pcie_configure_lane(rx2, tables->rx, tables->rx_num, 2);
}
} }
static void qmp_pcie_pcs_init(struct qmp_pcie *qmp, const struct qmp_phy_cfg_tables *tables) static void qmp_pcie_pcs_init(struct qmp_pcie *qmp, const struct qmp_phy_cfg_tables *tables)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册