From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: wsa+renesas@sang-engineering.com, ulf.hansson@linaro.org,
p.zabel@pengutronix.de, linux-mmc@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 1/3] mmc: renesas_sdhi: Deassert the reset signal on probe
Date: Fri, 10 Oct 2025 12:35:45 +0300 [thread overview]
Message-ID: <4cd8b624-3830-4989-b287-01e689cdb3df@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdW__Nw=oViQSPUb6zKbwRjXC7+6kUevHi1GzTTxrHxKkg@mail.gmail.com>
Hi, Geert,
On 10/10/25 10:51, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Fri, 10 Oct 2025 at 07:06, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> Deassert the reset signal of the SDHI controller during probe to avoid
>> relying on the previous bootloaders. Without deasserting the reset signal,
>> the SDHI controller will not function.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Thanks for your patch!
>
>> --- a/drivers/mmc/host/renesas_sdhi_core.c
>> +++ b/drivers/mmc/host/renesas_sdhi_core.c
>> @@ -1103,7 +1103,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
>> if (IS_ERR(priv->clk_cd))
>> return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk_cd), "cannot get cd clock");
>>
>> - priv->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
>> + priv->rstc = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev, NULL);
>
> Note that this has the side effect of asserting reset again on probe
> failure or unbind.
I agree. I've tested unbind/bind on RZ/G3S and I saw no issue.
> Also on SoCs that boot with reset already deasserted
> (e.g. R-Car). I don't know if that would be a problem.
I think all SoCs boot with resets de-asserted as the driver does register
configuration before calling reset_control_reset() in renesas_sdhi_reset(),
e.g:
- one register configuration is just above reset_control_reset()
- one register configuration, through sd_ctrl_write32_as_16_and_16(), in
renesas_sdhi_probe()
- register writes in tmio_mmc_reset() before host->reset() call
I did bonnie++ tests after boot on RZ/G2{H, M, N, L, UL}, RZ/V2L and saw no
issue.
Thank you for your review,
Claudiu
>
>> if (IS_ERR(priv->rstc))
>> return PTR_ERR(priv->rstc);
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2025-10-10 9:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 4:25 [PATCH 0/3] mmc: renesas_sdhi: Handle resets Claudiu
2025-10-08 4:25 ` [PATCH 1/3] mmc: renesas_sdhi: Deassert the reset signal on probe Claudiu
2025-10-10 7:51 ` Geert Uytterhoeven
2025-10-10 9:35 ` Claudiu Beznea [this message]
2025-11-13 21:06 ` Wolfram Sang
2025-10-08 4:25 ` [PATCH 2/3] mmc: renesas_sdhi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Claudiu
2025-10-13 16:20 ` Geert Uytterhoeven
2025-11-12 18:28 ` Wolfram Sang
2025-11-13 8:32 ` Geert Uytterhoeven
2025-11-11 16:22 ` Ulf Hansson
2025-11-13 8:01 ` Claudiu Beznea
2025-11-13 21:08 ` Wolfram Sang
2025-10-08 4:25 ` [PATCH 3/3] mmc: renesas_sdhi: Add suspend/resume hooks Claudiu
2025-11-11 16:24 ` Ulf Hansson
2025-11-13 21:09 ` Wolfram Sang
2025-11-10 15:36 ` [PATCH 0/3] mmc: renesas_sdhi: Handle resets Claudiu Beznea
2025-11-12 18:25 ` Wolfram Sang
2025-11-13 8:12 ` Claudiu Beznea
2025-11-13 21:13 ` Wolfram Sang
2025-11-17 9:11 ` Claudiu Beznea
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=4cd8b624-3830-4989-b287-01e689cdb3df@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=ulf.hansson@linaro.org \
--cc=wsa+renesas@sang-engineering.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