From: Kyle Roeschley <kyle.roeschley@ni.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: core: Wait for Vdd to settle on card power off
Date: Fri, 22 Sep 2017 08:57:04 -0500 [thread overview]
Message-ID: <20170922135704.4s7um4xflv634c3h@senary> (raw)
In-Reply-To: <CAPDyKFru8b+gP+FYuuJ_TekA57mLfAuaFV7NKe2eZqik2FGa7Q@mail.gmail.com>
On Fri, Sep 22, 2017 at 11:38:40AM +0200, Ulf Hansson wrote:
> On 21 September 2017 at 19:47, Kyle Roeschley <kyle.roeschley@ni.com> wrote:
> > The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be
> > lowered to less than 0.5V for a minimum of 1 ms when powering off a
> > card. Increase our wait to 10 ms so that voltage has time to drain down
> > to 0.5V and cards can power off correctly.
> >
> > Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
> > ---
> > drivers/mmc/core/core.c | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> > index 66c9cf49ad2f..38630246de26 100644
> > --- a/drivers/mmc/core/core.c
> > +++ b/drivers/mmc/core/core.c
> > @@ -1679,18 +1679,16 @@ void mmc_power_off(struct mmc_host *host)
> > mmc_set_initial_state(host);
> >
> > /*
> > - * Some configurations, such as the 802.11 SDIO card in the OLPC
> > - * XO-1.5, require a short delay after poweroff before the card
> > - * can be successfully turned on again.
> > + * The SD spec requires at least 1 ms with Vdd at less than 0.5 V
> > + * before a card can be re-powered, but we need to wait longer so that
> > + * the voltage has time to drain.
> > */
> > - mmc_delay(1);
> > + mmc_delay(10);
>
> No, this isn't the proper place of adding more "magic" delays.
>
> Instead, make sure the related ->set_ios() callback in the mmc host
> driver deals with this instead. In case it uses an external regulator,
> via the regulator API, then this is something that should be
> controlled with the definition of the regulator.
>
Thanks for pointing me in the right direction, I'll reimplement the fix there.
--
Kyle Roeschley
Software Engineer
National Instruments
next prev parent reply other threads:[~2017-09-22 13:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 17:47 [PATCH] mmc: core: Wait for Vdd to settle on card power off Kyle Roeschley
2017-09-22 9:38 ` Ulf Hansson
2017-09-22 13:57 ` Kyle Roeschley [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-11 21:46 Erick Shepherd
2025-02-13 10:22 ` Avri Altman
2025-03-05 18:38 ` Adrian Hunter
2025-03-07 17:46 ` Erick Shepherd
2025-03-07 18:53 ` Adrian Hunter
2025-03-07 21:16 ` Erick Shepherd
2025-03-12 12:44 ` Adrian Hunter
2025-03-13 3:35 ` Erick Shepherd
2025-03-13 8:20 ` Adrian Hunter
2025-03-13 20:44 ` Erick Shepherd
2025-03-14 5:56 ` Adrian Hunter
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=20170922135704.4s7um4xflv634c3h@senary \
--to=kyle.roeschley@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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