summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNitin Rawat <quic_nitirawa@quicinc.com>2025-05-26 21:08:13 +0530
committerVinod Koul <vkoul@kernel.org>2025-06-15 19:53:24 +0530
commit399c75b6a9ed2fd609f9ad4c22cdd6364bc9d441 (patch)
tree66e5abc538cb54b6e95141cad9504eb91521b897
parent6767df73f2d36e7d1cf0eb3c4d9469c7e9fe9824 (diff)
scsi: ufs: qcom: add a new phy calibrate API call
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>
-rw-r--r--drivers/ufs/host/ufs-qcom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 18a978452001..b764055c1854 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -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;