public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Huang Changming-R66093 <R66093@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org list"
	<linuxppc-dev@lists.ozlabs.org>,
	linux-mmc@vger.kernel.org,
	Anton Vorontsov <cbouatmailru@gmail.com>
Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
Date: Tue, 11 Sep 2012 10:44:32 -0400	[thread overview]
Message-ID: <87k3w0y5yn.fsf@octavius.laptop.org> (raw)
In-Reply-To: <2A6FCAE3-288F-4972-90C0-15105932F13E@kernel.crashing.org> (Kumar Gala's message of "Tue, 11 Sep 2012 07:49:04 -0500")

Hi,

On Tue, Sep 11 2012, Kumar Gala wrote:
> In sdhci_add_host()
>
> We have the following
>
> ...
>         mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
>
>         if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
>                 host->flags |= SDHCI_AUTO_CMD12;
>
>         /* Auto-CMD23 stuff only works in ADMA or PIO. */
>         if ((host->version >= SDHCI_SPEC_300) &&
>             ((host->flags & SDHCI_USE_ADMA) ||
>              !(host->flags & SDHCI_USE_SDMA))) {
>                 host->flags |= SDHCI_AUTO_CMD23;
>                 DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc));
>         } else {
>                 DBG("%s: Auto-CMD23 unavailable\n", mmc_hostname(mmc));
>         }
>
> ...
>
> I'm not clear what the difference is between mmc->caps & host->flags, but shouldn't we move setting MMC_CAP_CMD23 inside the 'Auto-CMD23' if check?

The main answer is:  No, because CMD23 is distinct from Auto-CMD23.

Multiblock transfers (CMD23) date back from MMC cards (which is why
they're an MMC host capability) and can also be used in SDHCI.

Auto-CMD23 is a new feature in SDHCI 3.0 that reduces the overhead
of sending CMD23.  It doesn't work if we're using SDMA, though.

As for capability vs. flags, the capability is more of an inherent
property of the controller, and flags are runtime decisions on whether
to use that capability, based on e.g. the presence of a quirk.

So, I think the code's correct as written.  Feel free to ask more
questions if you're investigating a specific problem that you haven't
mentioned yet.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2012-09-11 14:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  7:12 [PATCH 1/3] powerpc/esdhc: disable CMD23 for some Freescale SoCs Chang-Ming.Huang
2012-09-11  7:12 ` [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23 Chang-Ming.Huang
2012-09-11  7:12   ` [PATCH 3/3] MMC/esdhc: introduce the 'sdhci,no-cmd23' Chang-Ming.Huang
2012-09-11  7:55     ` Anton Vorontsov
2012-09-11  7:54   ` [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23 Anton Vorontsov
2012-09-11  8:04     ` Anton Vorontsov
2012-09-11  9:36       ` Huang Changming-R66093
2012-09-11 12:43         ` Kumar Gala
2012-09-11 12:49           ` Kumar Gala
2012-09-11 14:44             ` Chris Ball [this message]
2012-09-11 20:26               ` Kumar Gala
2012-09-11 20:59                 ` Chris Ball
2012-09-12  6:18                   ` Huang Changming-R66093
2012-09-12 12:13                     ` Kumar Gala
2012-09-13  2:02                       ` Huang Changming-R66093
2012-09-13 12:47                         ` Kumar Gala
2012-09-14  2:02                           ` Huang Changming-R66093
2012-09-14 12:40                             ` Kumar Gala
2012-09-17 12:36                           ` Chris Ball
2012-09-17 13:12                             ` Kumar Gala
2012-09-17 13:45                               ` Chris Ball
2012-09-18  1:09                               ` Huang Changming-R66093
2012-09-18  5:00                                 ` Kumar Gala
2012-09-18  5:07                                   ` Chris Ball
2012-09-11 18:28       ` Scott Wood
2012-09-12  3:19         ` Huang Changming-R66093
2012-09-12  3:38           ` Anton Vorontsov
2012-09-13  7:57             ` Huang Changming-R66093
2012-09-11  7:57 ` [PATCH 1/3] powerpc/esdhc: disable CMD23 for some Freescale SoCs Anton Vorontsov

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=87k3w0y5yn.fsf@octavius.laptop.org \
    --to=cjb@laptop.org \
    --cc=R66093@freescale.com \
    --cc=cbouatmailru@gmail.com \
    --cc=galak@kernel.crashing.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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