summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjay Neeli <ajay.neeli@amd.com>2025-12-24 11:09:50 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2026-01-23 22:43:44 -0500
commit0444568edbf87c1da76b61c798ce0f1c1e478467 (patch)
treee070def942608b36c159f3aa7e67297a7df87d91
parentb2d6b1d443009ed4da2d69f5423ab38e5780505a (diff)
scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify
Move the PHY initialization from PRE_CHANGE to POST_CHANGE in the ufs_versal2_hce_enable_notify() callback. This ensures that the PHY is initialized after the host controller enable sequence is complete, rather than before it starts. The PHY initialization requires the UFS host controller to be in a stable enabled state to properly configure the MPHY registers. Moving this to POST_CHANGE aligns with the expected initialization order and prevents potential timing issues during controller startup. Fixes: 769b8b2ffded ("scsi: ufs: amd-versal2: Add UFS support for AMD Versal Gen 2 SoC") Signed-off-by: Ajay Neeli <ajay.neeli@amd.com> Link: https://patch.msgid.link/20251224053950.54213-1-ajay.neeli@amd.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/ufs/host/ufs-amd-versal2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ufs/host/ufs-amd-versal2.c b/drivers/ufs/host/ufs-amd-versal2.c
index 40543db621a1..6c454ae8a9c8 100644
--- a/drivers/ufs/host/ufs-amd-versal2.c
+++ b/drivers/ufs/host/ufs-amd-versal2.c
@@ -367,7 +367,7 @@ static int ufs_versal2_hce_enable_notify(struct ufs_hba *hba,
{
int ret = 0;
- if (status == PRE_CHANGE) {
+ if (status == POST_CHANGE) {
ret = ufs_versal2_phy_init(hba);
if (ret)
dev_err(hba->dev, "Phy init failed (%d)\n", ret);