public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: NeilBrown <neilb@suse.de>,
	Javier Martinez Canillas <javier@dowhile0.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>,
	"linux-arm-kernel@lists.infradead.org
	<linux-arm-kernel@lists.infradead.org>," <mark.rutland@arm.com>
Subject: Re: [PATCH V4 1/4] mmc: core: Initial support for MMC power sequences
Date: Mon, 2 Feb 2015 15:05:37 +0000	[thread overview]
Message-ID: <20150202150537.GE8656@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAPDyKFo6G+PpV7QpxBEOS_xUxXTQ14v=qVLGpBjT_z6T0vP85A@mail.gmail.com>

On Mon, Feb 02, 2015 at 03:57:37PM +0100, Ulf Hansson wrote:
> On 30 January 2015 at 23:27, NeilBrown <neilb@suse.de> wrote:
> > Shortly before this call is
> >
> >         host->ios.power_mode = MMC_POWER_ON;
> >         mmc_set_ios(host);
> >
> > and omap_hsmmc_set_ios() contains:
> >
> >                 switch (ios->power_mode) {
> >                 ....
> >                 case MMC_POWER_ON:
> >                         do_send_init_stream = 1;
> >                         break;
> >
> >
> >         if (do_send_init_stream)
> >                 send_init_stream(host);
> >
> > Which sends the "init stream" to the card.
> > If the card is still being reset at this time, the stream may not
> > be effective.
> >
> > I find that about 10%-20% of the time when I release the reset line
> > *after* the sequence is sent, my card fails to initialised.  When I
> > release *before* the sequence is sent, it never fails.
> 
> Okay, thanks for providing these details.

The right thing to do then is to pulse the reset line at the pre-power-up
stage.

> > I note that other drivers handle the init stream differently.
> > atmel-mci just sets a flag in set_ios, and the actually sends the stream in
> > atmci_start_request()
> >
> > dw_mmc, jz4740_mmc, mxcmmc, pxamci do much the same

Yes.  PXAMCI is one of those dumb "inteligent" controllers that takes
some of the protocol handing away from the host software implementation.
The result of that is things happen at different times.

For PXAMCI, it's not possible to send the initialisation clocks on their
own; you have to queue up a command first.

> Well, the problem is that there are host drivers that don't consider
> MMC_POWER_UP and delays initialization/power_up to MMC_POWER_ON. So we
> might fix the issue for some, but breaks it for another.
> 
> I had a discussion around inconsistent host driver behaviours from
> ->set_ios() callbacks with Russell, for the first version of this
> patchset.

Yes, as I've said a few times now, I regard my original design of this
stuff (which was to separate MMC_POWER_UP and MMC_POWER_ON) to be a big
design mistake, and we should really kill MMC_POWER_UP ASAP, combining
both into a /single/ call into the host driver.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-02-02 15:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19  9:13 [PATCH V4 0/4] mmc: core: Add support for MMC power sequences Ulf Hansson
2015-01-19  9:13 ` [PATCH V4 1/4] mmc: core: Initial " Ulf Hansson
2015-01-28 10:17   ` Javier Martinez Canillas
2015-01-28 11:36     ` Ulf Hansson
2015-01-28 12:47       ` Javier Martinez Canillas
     [not found]       ` <20150131092715.566fa33c@notabene.brown>
2015-02-02 14:57         ` Ulf Hansson
2015-02-02 15:05           ` Russell King - ARM Linux [this message]
2015-02-02 15:10             ` Ulf Hansson
2015-02-02 22:10               ` NeilBrown
2015-02-03 12:39                 ` Ulf Hansson
2015-02-07  1:07                   ` NeilBrown
     [not found] ` <1421658784-11980-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-01-19  9:13   ` [PATCH V4 2/4] mmc: pwrseq: Document DT bindings for the simple MMC power sequence Ulf Hansson
2015-01-28 10:18     ` Javier Martinez Canillas
2015-01-19  9:13   ` [PATCH V4 4/4] mmc: pwrseq_simple: Add support for a reset GPIO pin Ulf Hansson
2015-01-23 15:56     ` Javier Martinez Canillas
     [not found]       ` <CABxcv=nGWPnkNz1tXJpaTUkroucDgVYzeCrEmZvA8xfzHzROvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-23 17:01         ` Ulf Hansson
2015-01-23 17:09           ` Javier Martinez Canillas
2015-01-28 10:20     ` Javier Martinez Canillas
2015-02-10  9:12     ` Alexandre Courbot
2015-02-11  4:34       ` Ulf Hansson
2015-03-05  9:05         ` Linus Walleij
2015-01-19  9:13 ` [PATCH V4 3/4] mmc: pwrseq: Initial support for the simple MMC power sequence provider Ulf Hansson
2015-01-28 10:19   ` Javier Martinez Canillas
2015-02-10  8:34   ` Alexandre Courbot
2015-02-11  4:28     ` Ulf Hansson
     [not found]       ` <CAPDyKFrdpknrMa62Vz4dfKaFMTdF-uXaAz3pkw_3qwNvHy49SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-11  4:34         ` Alexandre Courbot
2015-01-22  9:28 ` [PATCH V4 0/4] mmc: core: Add support for MMC power sequences Ulf Hansson

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=20150202150537.GE8656@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=chris@printf.net \
    --cc=javier@dowhile0.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=neilb@suse.de \
    --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