phy: qcom-qmp-pcie-msm8996: clean up power-down handling
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 17 Oct 2022 06:50:08 +0000 (08:50 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 17 Oct 2022 08:15:47 +0000 (13:45 +0530)
This driver uses v2 registers only so drop the unnecessary
POWER_DOWN_CONTROL override.

Note that this register is already hard-coded when powering on the PHY.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20221017065013.19647-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c

index 707ec81c7a2ae941e90040d6c8b6c0a3d65716ae..5fdd85a1dc3ef5f244a3e0b55f51eabd1e57073d 100644 (file)
@@ -91,7 +91,6 @@ enum qphy_reg_layout {
        QPHY_SW_RESET,
        QPHY_START_CTRL,
        QPHY_PCS_STATUS,
-       QPHY_PCS_POWER_DOWN_CONTROL,
        /* Keep last to ensure regs_layout arrays are properly initialized */
        QPHY_LAYOUT_SIZE
 };
@@ -591,13 +590,8 @@ static int qmp_pcie_msm8996_power_off(struct phy *phy)
        qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl);
 
        /* Put PHY into POWER DOWN state: active low */
-       if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) {
-               qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL],
-                            cfg->pwrdn_ctrl);
-       } else {
-               qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL,
-                               cfg->pwrdn_ctrl);
-       }
+       qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL,
+                       cfg->pwrdn_ctrl);
 
        return 0;
 }