From: <Eugen.Hristev@microchip.com>
To: <peng.fan@nxp.com>
Cc: <Sergiu.Moga@microchip.com>, <jh80.chung@samsung.com>,
<u-boot@lists.denx.de>, <Mihai.Sain@microchip.com>
Subject: Re: [PATCH] mmc: atmel_sdhci: re-enable sdhci after SD Card re-insertion
Date: Fri, 8 Jul 2022 12:40:30 +0000 [thread overview]
Message-ID: <e7deebe3-940b-db1b-dc1b-7e76ae8266cc@microchip.com> (raw)
In-Reply-To: <20220622133047.33844-1-sergiu.moga@microchip.com>
On 6/22/22 4:30 PM, Sergiu Moga wrote:
> Whenever the SD Card would be removed and then re-inserted while in the
> U-Boot command line, the `SDBPWR` bit of the `SDMMC_PCR` register would
> remain unset afterwards. In order for the bit to be set again after
> re-insertion, register an additional `deferred_probe` method that the
> DM would then transparently call. This method will call the generic
> `sdhci_probe` which will, during its execution flow, set this bit to 1.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> Reported-by: Mihai Sain <mihai.sain@microchip.com>
> Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
Hi Peng,
To take this patch into my tree I would be happy if you had a look or
reviewed it first.
Thanks,
Eugen
> drivers/mmc/atmel_sdhci.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
> index 2b5ceeab94..37b0beeed4 100644
> --- a/drivers/mmc/atmel_sdhci.c
> +++ b/drivers/mmc/atmel_sdhci.c
> @@ -52,6 +52,17 @@ struct atmel_sdhci_plat {
> struct mmc mmc;
> };
>
> +static int atmel_sdhci_deferred_probe(struct sdhci_host *host)
> +{
> + struct udevice *dev = host->mmc->dev;
> +
> + return sdhci_probe(dev);
> +}
> +
> +static const struct sdhci_ops atmel_sdhci_ops = {
> + .deferred_probe = atmel_sdhci_deferred_probe,
> +};
> +
> static int atmel_sdhci_probe(struct udevice *dev)
> {
> struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
> @@ -104,6 +115,7 @@ static int atmel_sdhci_probe(struct udevice *dev)
> return ret;
>
> host->mmc->priv = host;
> + host->ops = &atmel_sdhci_ops;
> upriv->mmc = host->mmc;
>
> clk_free(&clk);
>
next prev parent reply other threads:[~2022-07-08 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 13:30 [PATCH] mmc: atmel_sdhci: re-enable sdhci after SD Card re-insertion Sergiu Moga
2022-07-08 12:40 ` Eugen.Hristev [this message]
2022-08-17 6:06 ` Eugen.Hristev
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=e7deebe3-940b-db1b-dc1b-7e76ae8266cc@microchip.com \
--to=eugen.hristev@microchip.com \
--cc=Mihai.Sain@microchip.com \
--cc=Sergiu.Moga@microchip.com \
--cc=jh80.chung@samsung.com \
--cc=peng.fan@nxp.com \
--cc=u-boot@lists.denx.de \
/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