From: David Vrabel <david.vrabel@csr.com>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: zhangfei gao <zhangfei.gao@gmail.com>,
Philip Rakity <prakity@marvell.com>, Chris Ball <cjb@laptop.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Mark Brown <markb@marvell.com>, Zhangfei Gao <zgao6@marvell.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>
Subject: Re: [PATCH V3 3/3 ] mmc: add support for H/W clock gating of SD controller (resend)
Date: Mon, 13 Dec 2010 14:50:12 +0000 [thread overview]
Message-ID: <4D0632A4.4050905@csr.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1012081158490.10437@xanadu.home>
Nicolas Pitre wrote:
> On Wed, 8 Dec 2010, zhangfei gao wrote:
>
>> On Tue, Dec 7, 2010 at 9:50 PM, Philip Rakity <prakity@marvell.com> wrote:
>>> On Dec 7, 2010, at 5:49 PM, zhangfei gao wrote:
>>>> 2. we have to fully verify the hardware clk gating internally before
>>>> sending the code.
>>> code tested under marvell 2.6.32 linux.
>> Thanks a lot, just wander could sdio be supported, since marvell8787
>> requires around 10 clock cycles after cmd53 finished.
The specification requires only 8 clocks after end bit of a CMD53 data
block. (SD physical spec 3.01 section 4.4, clock control). It is
possible that the controller sends more than the minimum.
> SDIO is currently left out as this is not clear if all SDIO cards still
> can send interrupts if their clock is disabled, or even function
> properly. This might have to be a property that the SDIO function
> drivers could provide to the core.
It's a minefield.
Cards in 1-bit mode may interrupt at any time whether there is a clock
or not.
Cards compliant to SDIO v2.00 should require the clock to generate
interrupts when in 4-bit mode as this is what's specified in the
specification. As a vendor-specific extension, some v2.00 cards (e.g.,
all CSR devices) do not require the clock.
Cards compliant to SDIO v3.00 may optionally have the clock turned off
if the card indicates support for asynchronous interrupts and support
has been enabled (via CCCR register bits).
Some host controllers will not detect interrupts if the clock is off and
4-bit mode is enabled.
I would suggest:
* Cards have a property: auto-clock-disable which indicates if the the
clock can be switched off automatically by mmc core or if hardware clock
gating may be used.
a. Memory cards would set this to true.
b. SDIO v2.00 cards would set this to false.
c. SDIO v3.00 cards would set this to true if asynchronous interrupts
are supported and enabled, otherwise false.
d. combo cards set this based on the SDIO function.
* If necessary, host controllers switch to 1-bit mode if the clock is
turned off and switch back to 4-bit mode when the clock is turned back
on (e.g., some sdhci controllers require this).
* SDIO function drivers can set auto-clock-disable to true if they're
for a v2.00 card that supports asynchronous interrupts.
David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
next prev parent reply other threads:[~2010-12-13 14:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 22:46 [PATCH V3 1/3 ] mmc: add support for H/W clock gating of SD controller Philip Rakity
2010-12-08 0:16 ` Chris Ball
2010-12-08 0:20 ` [PATCH V3 3/3 ] mmc: add support for H/W clock gating of SD controller (resend) Philip Rakity
2010-12-08 1:49 ` zhangfei gao
2010-12-08 2:50 ` Philip Rakity
2010-12-08 7:13 ` zhangfei gao
2010-12-08 14:09 ` Philip Rakity
2010-12-08 17:02 ` Nicolas Pitre
2010-12-13 14:50 ` David Vrabel [this message]
2010-12-13 15:54 ` Philip Rakity
2010-12-08 10:11 ` Wolfram Sang
2010-12-08 14:05 ` Philip Rakity
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=4D0632A4.4050905@csr.com \
--to=david.vrabel@csr.com \
--cc=cjb@laptop.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-mmc@vger.kernel.org \
--cc=markb@marvell.com \
--cc=nico@fluxnic.net \
--cc=prakity@marvell.com \
--cc=zgao6@marvell.com \
--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 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.