From: Michal Simek <michal.simek@amd.com>
To: linux-kernel@vger.kernel.org, monstr@monstr.eu, git@amd.com,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Ajay Neeli <ajay.neeli@amd.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>,
"moderated list:ARM/ZYNQ ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
"open list:SCSI SUBSYSTEM" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] firmware: xilinx: ufs: move PHY/SRAM ready polling into the firmware backend
Date: Mon, 31 Aug 2026 09:19:43 +0200 [thread overview]
Message-ID: <891250a6-ae3f-4abe-b58c-92c8b9cb35ee@amd.com> (raw)
In-Reply-To: <eaeaaea8ed76069943e0706a0917139ff6569929.1785855749.git.michal.simek@amd.com>
Hi Martin,
On 8/4/26 17:02, Michal Simek wrote:
> The Versal Gen 2 UFS driver polls the firmware for M-PHY TX/RX
> configuration readiness and SRAM initialisation completion with two
> open-coded do/while loops. Each iteration is a full firmware round-trip
> (PM_IOCTL/IOCTL_READ_REG of a protected PMC_IOU_SLCR register), so the
> loop can issue up to a million EEMI calls, and it hard-codes the wait
> policy inside the controller driver.
>
> Introduce coarse blocking helpers, zynqmp_pm_wait_mphy_tx_rx_config_ready()
> and zynqmp_pm_wait_sram_init_done(), that take a caller-supplied timeout
> budget and contain the poll loop. The loop is EEMI-specific (legacy
> firmware only exposes the per-read status primitive) so it lives in the
> firmware driver, keeping the UFS driver backend-agnostic: a future
> backend can offload the wait to the platform in a single call without
> touching the controller driver again. The existing per-read primitives stay
> exported, so the current EEMI interface is unchanged.
>
> The timeout budget remains owned by the UFS driver (the consumer that
> knows the hardware) and is passed down, so EEMI and any future backend
> stay consistent.
>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
Do you have any issue with this patch? If not, I would take it via my soc tree.
Thanks,
Michal
prev parent reply other threads:[~2026-08-31 7:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 15:02 [PATCH] firmware: xilinx: ufs: move PHY/SRAM ready polling into the firmware backend Michal Simek
2026-08-11 14:25 ` Sai Krishna Potthuri
2026-08-31 7:19 ` Michal Simek [this message]
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=891250a6-ae3f-4abe-b58c-92c8b9cb35ee@amd.com \
--to=michal.simek@amd.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ajay.neeli@amd.com \
--cc=git@amd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=monstr@monstr.eu \
--cc=sai.krishna.potthuri@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