[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221021110947.28103-8-johan+linaro@kernel.org>
Date: Fri, 21 Oct 2022 13:09:39 +0200
From: Johan Hovold <johan+linaro@...nel.org>
To: Vinod Koul <vkoul@...nel.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-phy@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Johan Hovold <johan+linaro@...nel.org>
Subject: [PATCH v3 07/15] 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: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index bd946438e3c3..dd7e72424fc0 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -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;
void __iomem *tx = qmp->tx;
void __iomem *rx = qmp->rx;
+ void __iomem *tx2 = qmp->tx2;
+ void __iomem *rx2 = qmp->rx2;
if (!tables)
return;
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);
- 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)
--
2.37.3
Powered by blists - more mailing lists