From: Marek Vasut <marex@nabladev.com>
To: Christophe KERELLO <christophe.kerello@foss.st.com>,
Ulf Hansson <ulf.hansson@oss.qualcomm.com>
Cc: linux-mmc@vger.kernel.org,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Ulf Hansson <ulfh@kernel.org>,
kernel@dh-electronics.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH] mmc: mmci: stm32: handle mmc power up
Date: Sat, 14 Nov 2026 02:00:42 +0100 [thread overview]
Message-ID: <73cca072-583d-4601-8953-6f2769c6cb19@nabladev.com> (raw)
In-Reply-To: <e996f9ab-6373-4a27-b5ae-591ba33845c5@foss.st.com>
On 11/13/26 5:53 PM, Christophe KERELLO wrote:
> Hello Ulf,
>
> On 11/13/26 12:46, Ulf Hansson wrote:
>> On Thu, Nov 12, 2026 at 7:26 AM Marek Vasut <marex@nabladev.com> wrote:
>>> On 11/11/26 12:45 PM, Ulf Hansson wrote:
>>>
>>> Hello Ulf,
>>>
>>>>>>> - if (ios.power_mode == MMC_POWER_OFF) {
>>>>>>> + if (ios.power_mode == MMC_POWER_OFF ||
>>>>>>> + ios.power_mode == MMC_POWER_UP) {
>>>>>>> /* Only a reset could power-off sdmmc */
>>>>>>> reset_control_assert(host->rst);
>>>>>>> udelay(2);
>>>>>> What exactly will this reset?
>>>>> The controller.
>>>> Okay, I see.
>>>>
>>>> In that case, this reset also makes us reset preceding updates to any
>>>> other registers, for example the clock register. I would not recommend
>>>> doing that here, but perhaps there is no better option.
>>> Does that pose a problem in the MMC_POWER_OFF/UP state ? I agree this
>>> would pose a problem in the MMC_POWER_ON state, but here the card is
>>> not ON.
>> I think it is a problem, yes. If you have a closer look at what
>> happens in mmci_set_ios(), I think you will agree.
>>
>>>> If I may I suggest an alternative solution, perhaps we can manage this
>>>> in the ->runtime_resume() callback instead. If the power_mode ==
>>>> MMC_POWER_OFF, perhaps do this reset there instead? Would that work?
>> Can you try this?
>
> I have sent a new patch based on your proposal:
> https://lore.kernel.org/linux-mmc/20261113-fix-resume-reset-
> v1-1-115b3da5764d@foss.st.com/
>
> It works fine on my side.
>
> Hi Marek,
> Could you also test it on your board to confirm that it fixes the issue
> you reported?
This works too, thanks .
prev parent reply other threads:[~2026-11-14 10:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 21:53 Marek Vasut
2026-11-10 13:32 ` Ulf Hansson
2026-11-11 2:27 ` Marek Vasut
2026-11-11 11:45 ` Ulf Hansson
2026-11-12 1:22 ` Marek Vasut
2026-11-13 11:46 ` Ulf Hansson
2026-11-13 16:53 ` Christophe KERELLO
2026-11-14 1:00 ` Marek Vasut [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=73cca072-583d-4601-8953-6f2769c6cb19@nabladev.com \
--to=marex@nabladev.com \
--cc=alexandre.torgue@foss.st.com \
--cc=christophe.kerello@foss.st.com \
--cc=kernel@dh-electronics.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=ulf.hansson@oss.qualcomm.com \
--cc=ulfh@kernel.org \
/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®