]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: ufs: qcom: add a new phy calibrate API call
authorNitin Rawat <quic_nitirawa@quicinc.com>
Mon, 26 May 2025 15:38:13 +0000 (21:08 +0530)
committerVinod Koul <vkoul@kernel.org>
Sun, 15 Jun 2025 14:23:24 +0000 (19:53 +0530)
Introduce a new phy calibrate API call in the UFS Qualcomm driver to
separate phy calibration from phy power-on. This change is a precursor
to the successive commits in this series, which requires these two
operations to be distinct.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20250526153821.7918-3-quic_nitirawa@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/ufs/host/ufs-qcom.c

index 18a9784520013e825df0c576070f6d768f4edf27..b764055c1854e97346a0b72811097805466b5c87 100644 (file)
@@ -532,6 +532,12 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
                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;
+       }
+
        ufs_qcom_select_unipro_mode(host);
 
        return 0;