>From 88f4bdfee770cd433a940a14e318d8c8b5dfa516 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Fri, 27 Mar 2026 13:18:05 +0200 Subject: [PATCH 3/3] scsi: ufs: qcom: make use of QMP PHY dynamic gear switching ability The QMP UFS PHY can now tolerate having phy_set_mode_ext() being called while the PHY is powered up. We no longer need to power it down, back up and calibrate it. Simplify ufs_qcom_power_up_sequence() by relying on just phy_set_mode_ext() and let PHY power management be handled just by ufs_qcom_setup_clocks(). Signed-off-by: Vladimir Oltean --- drivers/ufs/host/ufs-qcom.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index ffa70c6c7143..cf7b67f2021e 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -508,37 +508,14 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) if (ret) return ret; - if (phy->power_count) - phy_power_off(phy); - - /* phy initialization - calibrate the phy */ ret = phy_set_mode_ext(phy, mode, host->phy_gear); if (ret) - goto out_disable_phy; - - /* power on phy - start serdes and phy's power and clocks */ - ret = phy_power_on(phy); - if (ret) { - dev_err(hba->dev, "%s: phy power on failed, ret = %d\n", - __func__, ret); - goto out_disable_phy; - } - - ret = phy_calibrate(phy); - if (ret) { - dev_err(hba->dev, "Failed to calibrate PHY: %d\n", ret); - goto out_disable_phy; - } + return ret; ufs_qcom_select_unipro_mode(host); return 0; - -out_disable_phy: - phy_exit(phy); - - return ret; } /* -- 2.34.1