From: Arnd Bergmann <arnd@arndb.de>
To: zhangfei gao <zhangfei.gao@gmail.com>
Cc: Arindam Nath <arindam.nath@amd.com>,
cjb@laptop.org, linux-mmc@vger.kernel.org, henry.su@amd.com,
aaron.lu@amd.com, anath.amd@gmail.com
Subject: Re: [PATCH 01/12] mmc: sdhci: add support for auto CMD23
Date: Fri, 18 Feb 2011 11:50:41 +0100 [thread overview]
Message-ID: <201102181150.41350.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTi=Dmsud5KJqFcP-97FxgyLVKmnxPn9e3z6fqqNc@mail.gmail.com>
On Friday 18 February 2011 11:45:27 zhangfei gao wrote:
> On Tue, Feb 15, 2011 at 4:34 AM, Arindam Nath <arindam.nath@amd.com> wrote:
> > Host Controller v3.00 and later support Auto CMD23 in the Transfer
> > Mode register. Since Auto CMD23 can be used with or without DMA,
> > and if used with DMA, it should only be ADMA, we check against
> > SDHCI_USE_SDMA not being set. This flag is reset when SDHCI_USE_ADMA
> > is set.
> >
> > A new definition for SDHCI_ARGUMENT2 register has been added
> > in v3.00 spec, which is the same as SDHCI_DMA_ADDRESS. We program the
> > block count for CMD23 in SDHCI_ARGUMENT2, so we don't need CMD12 to
> > stop multiple block transfers. But during error recovery procedure,
> > we will need to send Abort command, so we use a global variable
> > abort_cmd to save the stop command to be used later.
> >
> > Two bits are added to SCR register as per the Physical Layer Spec v3.01,
> > which specify whether the card supports CMD20 and/or CMD23. We use this
> > as one of the conditions to decide whether to enable Auto CMD23 or not.
> >
> > Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Why are you doing this in the SDHC code and not in the block driver code?
AFAICT, whether CMD23 can be used or not is primarily a decision based on
the card, and the block driver might want issue it for a longer range
if it needs to split a block request into multiple MMC requests.
You you add another flag to the host capabilities instead that tells
the lower driver if CMD23 is supported, and then issue it from there?
Arnd
next prev parent reply other threads:[~2011-02-18 10:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 9:34 [PATCH 00/12] add support for sd host controller v3.00 Arindam Nath
2011-02-15 9:34 ` [PATCH 01/12] mmc: sdhci: add support for auto CMD23 Arindam Nath
2011-02-15 20:58 ` Nicolas Pitre
2011-02-16 8:04 ` Nath, Arindam
2011-02-18 10:45 ` zhangfei gao
2011-02-18 10:50 ` Arnd Bergmann [this message]
2011-02-18 12:08 ` Nath, Arindam
2011-02-18 13:08 ` Arnd Bergmann
2011-02-18 13:35 ` Nath, Arindam
2011-02-18 15:40 ` Arnd Bergmann
2011-02-18 15:49 ` [PATCH 01/12] mmc: sdhci: add support for SD Host Controller 3.0 Philip Rakity
2011-02-18 17:17 ` Nath, Arindam
2011-02-18 18:55 ` Nicolas Pitre
2011-02-18 19:08 ` Philip Rakity
2011-02-18 19:06 ` Philip Rakity
2011-02-18 11:53 ` [PATCH 01/12] mmc: sdhci: add support for auto CMD23 Nath, Arindam
2011-02-15 9:35 ` [PATCH 02/12] mmc: sd: add support for signal voltage switch procedure Arindam Nath
2011-02-15 10:16 ` Wolfram Sang
2011-02-16 7:55 ` Nath, Arindam
2011-02-15 21:18 ` Nicolas Pitre
2011-02-16 8:08 ` Nath, Arindam
2011-03-01 16:02 ` subhashj
2011-03-02 8:06 ` Nath, Arindam
2011-03-03 13:16 ` subhashj
2011-03-03 13:34 ` Nath, Arindam
2011-03-03 21:08 ` subhashj
2011-03-03 22:49 ` Philip Rakity
2011-03-04 6:10 ` Nath, Arindam
2011-02-15 9:35 ` [PATCH 03/12] mmc: sd: query function modes for uhs cards Arindam Nath
2011-02-15 9:35 ` [PATCH 04/12] mmc: sd: add support for driver type selection Arindam Nath
2011-02-15 9:35 ` [PATCH 05/12] mmc: sdhci: reset sdclk before setting high speed enable Arindam Nath
2011-02-15 9:35 ` [PATCH 06/12] mmc: sd: add support for uhs bus speed mode selection Arindam Nath
2011-03-09 21:43 ` Philip Rakity
2011-02-15 9:35 ` [PATCH 07/12] mmc: sd: set current limit for uhs cards Arindam Nath
2011-02-15 9:35 ` [PATCH 08/12] mmc: sd: report correct speed and capacity of " Arindam Nath
2011-02-15 9:35 ` [PATCH 09/12] mmc: sd: add support for tuning during uhs initialization Arindam Nath
2011-02-18 10:50 ` zhangfei gao
2011-02-18 11:33 ` Nath, Arindam
2011-02-15 9:35 ` [PATCH 10/12] mmc: sdhci: enable preset value after " Arindam Nath
2011-02-15 9:35 ` [PATCH 11/12] mmc: sdhci: add support for programmable clock mode Arindam Nath
2011-02-15 9:35 ` [PATCH 12/12] mmc: sdhci: add support for retuning mode 1 Arindam Nath
2011-02-15 19:43 ` [PATCH 00/12] add support for sd host controller v3.00 Chris Ball
2011-02-16 8:00 ` Nath, Arindam
2011-02-16 20:55 ` Chris Ball
2011-02-17 2:03 ` Nath, Arindam
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=201102181150.41350.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=aaron.lu@amd.com \
--cc=anath.amd@gmail.com \
--cc=arindam.nath@amd.com \
--cc=cjb@laptop.org \
--cc=henry.su@amd.com \
--cc=linux-mmc@vger.kernel.org \
--cc=zhangfei.gao@gmail.com \
/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