public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Hein_Tibosch <hein_tibosch@yahoo.es>
To: Pavel Machek <pavel@ucw.cz>
Cc: Ben Nizette <bn@niasdigital.com>,
	Pierre Ossman <pierre@ossman.eu>,
	Adrian Hunter <adrian.hunter@nokia.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matt Fleming <matt@console-pimps.org>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH v2] mmc: lower init clock frequency to 300kHz
Date: Wed, 06 Jan 2010 17:01:03 +0800	[thread overview]
Message-ID: <4B44514F.7080307@yahoo.es> (raw)
In-Reply-To: <20100106070141.GC1382@ucw.cz>

On 6-1-2010 15:01, Pavel Machek wrote:
> Machine with minimum clock of 1MHz is clearly broken, yet you issue
> "soft" warning.
>
> What about:
>
>      if (f_min > 400k)
>      	print existing warning
>      else if (f_min > 300k)
>         print warning 'if your card does not work, its broken,  but
> 	      	           	your host is unhelpful'
>      clock = f_min
>      if (clock < 3o0)
>      	 clock = 300
>
> ?
>   
Later in this thread I mentioned that initialization at 300 Khz is
too fast for some platforms/cards (avr32 AP7000/main-stream cards).
They will report CRC-errors so the above won't work.

I have looked at the time it will take to exchange the initial data (about
85 bytes), using different busses and frequencies:
	
        Intface:  8-bits  4-bits  SPI
Bus-freq:
400000 (Hz)       0.213   0.425    1.700 (ms)
300000            0.283   0.567    2.267
200000            0.425   0.850    3.400
100000            0.850   1.700    6.800
50000             1.700   3.400   13.600
100               850     1700    6800

These are netto times, without the msleep's for power-up and without
overhead.

Looking at this table, I would use a fixed bottom of 100 Khz:

	if (f_min > 400k)
		print existing warning
	clock = max (100k, host->f_min);

Regards, Hein








  reply	other threads:[~2010-01-06  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-01 23:11 [PATCH v2] mmc: lower init clock frequency to 300kHz Ben Nizette
2010-01-06  7:01 ` Pavel Machek
2010-01-06  9:01   ` Hein_Tibosch [this message]
     [not found] <1246492196.2980.17.camel@linux-51e8.site>
     [not found] ` <20090702135849.21370282@hskinnemoen-d830>
     [not found]   ` <1246537056.2980.60.camel@linux-51e8.site>
     [not found]     ` <4B3E570C.2060602@yahoo.es>
     [not found]       ` <63809451-ED1D-487A-AE63-F72B23D136D8@niasdigital.com>
     [not found]         ` <4B3F019F.6010306@yahoo.es>
2010-01-02  9:07           ` Ben Nizette
2010-01-02 12:08             ` Pierre Ossman

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=4B44514F.7080307@yahoo.es \
    --to=hein_tibosch@yahoo.es \
    --cc=adrian.hunter@nokia.com \
    --cc=bn@niasdigital.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=pavel@ucw.cz \
    --cc=pierre@ossman.eu \
    --cc=s.hauer@pengutronix.de \
    /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