On Dec 13, 2010, at 6:50 AM, David Vrabel wrote:

> Nicolas Pitre wrote:
>> On Wed, 8 Dec 2010, zhangfei gao wrote:
>> 
>>> On Tue, Dec 7, 2010 at 9:50 PM, Philip Rakity <prak...@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.
> 

hardware was designed before sdio 3.0

>> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to