All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lei Wen <adrian.wenl@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: retry the cmd8 to meet 74 clocks requirement in the spec
Date: Mon, 5 Sep 2011 10:50:22 +0800	[thread overview]
Message-ID: <CALZhoST5chLtswgHrjiODE4SkSP-M6azY6FWFuyOvxdncQeFCw@mail.gmail.com> (raw)
In-Reply-To: <CAKWjMd7WUPdjPBRFPeDtOpyQ7mv=fJnvZrg=2nH=z9ZjpOW4Lw@mail.gmail.com>

Hi Andy,

On Mon, Sep 5, 2011 at 6:45 AM, Andy Fleming <afleming@gmail.com> wrote:
> On Sun, Sep 4, 2011 at 5:18 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> On Saturday, September 03, 2011 05:34:17 AM Lei Wen wrote:
>>> For some controller it has dynamic clock gating, and only toggle out clk
>>> when the first cmd0 send out, while some card strictly obey the 74
>>> clocks rule, the interval may not be sufficient between the cmd0 and
>>> this cmd8, retry to fulfil the clock requirement.
>
>
> This seems like the wrong way to handle this. What if another
> controller shows up, but it takes *4* retries. Or *5*?
>
> Or *100*? This sort of knowledge should somehow be embedded in either
> the driver for that controller, or the board
> code. Not the generic MMC code.
>
> Maybe put it in the init code for the controller?
>

The card after the cmd0 need sometimes to be stabilize. Linux also add
some kind of
mmc_delay function inside the mmc_go_idle() fucntion in the generic framework.

The retry time cannot be 100 that much. :) Since the 74 clocks is such
short time, that
even the second try would serve good. Make it a part of generic could
remove the ugly
handling in the controller driver itself, and others also could
benefit from it...

Best regards,
Lei

      reply	other threads:[~2011-09-05  2:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-03  3:34 [U-Boot] [PATCH] mmc: retry the cmd8 to meet 74 clocks requirement in the spec Lei Wen
2011-09-04 22:18 ` Marek Vasut
2011-09-04 22:45   ` Andy Fleming
2011-09-05  2:50     ` Lei Wen [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=CALZhoST5chLtswgHrjiODE4SkSP-M6azY6FWFuyOvxdncQeFCw@mail.gmail.com \
    --to=adrian.wenl@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.