aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
diff options
context:
space:
mode:
authorGravatar Johan Hovold <johan+linaro@kernel.org> 2022-10-24 11:00:37 +0200
committerGravatar Vinod Koul <vkoul@kernel.org> 2022-10-28 18:30:30 +0530
commite0a0c761d2203955585b2c93126d6a712726c368 (patch)
tree916904a33cb0daec1a0454f259b1240ff723d117 /drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
parentphy: qcom-qmp-ufs: rename PHY ops structure (diff)
downloadlinux-e0a0c761d2203955585b2c93126d6a712726c368.tar.gz
linux-e0a0c761d2203955585b2c93126d6a712726c368.tar.bz2
linux-e0a0c761d2203955585b2c93126d6a712726c368.zip
phy: qcom-qmp-ufs: clean up PHY init
Clean up the PHY initialisation somewhat programming both tx and rx for the second lane after the first lane. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20221024090041.19574-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/qualcomm/phy-qcom-qmp-ufs.c')
-rw-r--r--drivers/phy/qualcomm/phy-qcom-qmp-ufs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index 90583b87efd1..fa703e856eb7 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -859,14 +859,12 @@ static int qmp_ufs_power_on(struct phy *phy)
/* Tx, Rx, and PCS configurations */
qmp_ufs_configure_lane(tx, cfg->tx_tbl, cfg->tx_tbl_num, 1);
-
- if (cfg->lanes >= 2)
- qmp_ufs_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2);
-
qmp_ufs_configure_lane(rx, cfg->rx_tbl, cfg->rx_tbl_num, 1);
- if (cfg->lanes >= 2)
+ if (cfg->lanes >= 2) {
+ qmp_ufs_configure_lane(qmp->tx2, cfg->tx_tbl, cfg->tx_tbl_num, 2);
qmp_ufs_configure_lane(qmp->rx2, cfg->rx_tbl, cfg->rx_tbl_num, 2);
+ }
qmp_ufs_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num);