From: Ajay Neeli <ajay.neeli@amd.com>
To: <martin.petersen@oracle.com>, <James.Bottomley@HansenPartnership.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<git@amd.com>, <sai.krishna.potthuri@amd.com>,
<michal.simek@amd.com>, <srinivas.goud@amd.com>,
<radhey.shyam.pandey@amd.com>, Ajay Neeli <ajay.neeli@amd.com>
Subject: [PATCH] scsi: ufs: amd-versal2: Fix PHY initialization in HCE enable notify
Date: Wed, 24 Dec 2025 11:09:50 +0530 [thread overview]
Message-ID: <20251224053950.54213-1-ajay.neeli@amd.com> (raw)
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>
---
drivers/ufs/host/ufs-amd-versal2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.43.0
next reply other threads:[~2025-12-24 5:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-24 5:39 Ajay Neeli [this message]
2026-01-24 3:53 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251224053950.54213-1-ajay.neeli@amd.com \
--to=ajay.neeli@amd.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=git@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michal.simek@amd.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=sai.krishna.potthuri@amd.com \
--cc=srinivas.goud@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®