lkml.org 
[lkml]   [2009]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mmc_core: fix data timeout for SEND_EXT_CSD
Matt Fleming wrote:
> On Thu, Feb 19, 2009 at 09:33:48AM +0200, Adrian Hunter wrote:
>> ext Pierre Ossman wrote:
>>> I'm confused. Where did the 64 come from in the first place? That
>>> function will not be called for CID/CSD when !SPI. So the way I see it
>>> the code should be:
>>>
>>> if ((opcode == MMC_SEND_CSD) || (opcode == (MMC_SEND_CID)) {
>>> data.timeout_ns = 0;
>>> data.timeout_clks = 8;
>>> } else {
>>> mmc_set_data_timeout(&data, card);
>>> }
>> Theoretically yes, it should be 8 not 64 - if all the SPI devices obey
>> the standard. As I do not have an SPI device I did not feel comfortable
>> changing it. Also 64 clocks is not a long time anyway, so it did not
>> seem to do any harm.
>
> When I wrote the code, I got the 64 clock cycle timeout from the MMC
> spec that I was looking at. Unfortunately, I don't have the spec in
> front of me at the moment. It is possible that I read the timeout for
> the !SPI case, though.

No it is my mistake. The value is 8 but the unit is 8 clock cycles
i.e. 64 clock cycles. So my comment was wrong.



\
 
 \ /
  Last update: 2009-02-19 13:01    [W:0.068 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site