From: Michal Simek <michal.simek@amd.com>
To: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>,
u-boot@lists.denx.de
Cc: peng.fan@nxp.com, jh80.chung@samsung.com, git@amd.com
Subject: Re: [PATCH] mmc: zynq_sdhci: Reset the host controller
Date: Wed, 25 Jun 2025 14:22:32 +0200 [thread overview]
Message-ID: <9afa7068-79e2-4d87-8d71-ce38a8d40bd2@amd.com> (raw)
In-Reply-To: <20250625052639.229461-1-venkatesh.abbarapu@amd.com>
On 6/25/25 07:26, Venkatesh Yadav Abbarapu wrote:
> Reset the host controller at the early stage of probe so that the
> configuration will be done properly for reboot cases.
>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
> ---
> drivers/mmc/zynq_sdhci.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
> index 0e2bdab4e7e..5d797dfd0c4 100644
> --- a/drivers/mmc/zynq_sdhci.c
> +++ b/drivers/mmc/zynq_sdhci.c
> @@ -1127,6 +1127,27 @@ static int arasan_sdhci_probe(struct udevice *dev)
> if (arasan_sdhci_is_compatible(dev, SDHCI_COMPATIBLE_VERSAL_NET_EMMC))
> priv->internal_phy_reg = true;
>
> + ret = reset_get_bulk(dev, &priv->resets);
> + if (ret == -ENOTSUPP || ret == -ENOENT) {
> + dev_warn(dev, "Reset not found\n");
> + return 0;
> + } else if (ret) {
> + dev_err(dev, "Reset failed\n");
> + return ret;
> + }
> +
> + ret = reset_assert_bulk(&priv->resets);
> + if (ret) {
> + dev_err(dev, "Reset assert failed\n");
> + return ret;
> + }
> +
> + ret = reset_deassert_bulk(&priv->resets);
> + if (ret) {
> + dev_err(dev, "Reset release failed\n");
> + return ret;
> + }
reset can still be optional right?
It means if reset is found you should call assert/deassert.
Not sure if there is any need to keep reset for some time.
If reset is not preset it should pass.
If reset is present but error out because whatever reason you should return error.
M
> +
> ret = clk_get_by_index(dev, 0, &clk);
> if (ret < 0) {
> dev_err(dev, "failed to get clock\n");
prev parent reply other threads:[~2025-06-25 12:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 5:26 [PATCH] mmc: zynq_sdhci: Reset the host controller Venkatesh Yadav Abbarapu
2025-06-25 12:22 ` 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=9afa7068-79e2-4d87-8d71-ce38a8d40bd2@amd.com \
--to=michal.simek@amd.com \
--cc=git@amd.com \
--cc=jh80.chung@samsung.com \
--cc=peng.fan@nxp.com \
--cc=u-boot@lists.denx.de \
--cc=venkatesh.abbarapu@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