From: Chris Ball <cjb@laptop.org>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: Simon Horman <horms@verge.net.au>,
Yusuke Goda <yusuke.goda.sx@renesas.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
linux-mmc@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>,
Cao Minh Hiep <hiepcm@gmail.com>
Subject: Re: [PATCH 2/2] mmc: sh_mmcif: mmc->f_max should be half of the bus clock
Date: Mon, 26 Mar 2012 23:20:43 -0400 [thread overview]
Message-ID: <87limmybjo.fsf@laptop.org> (raw)
In-Reply-To: <CANqRtoTtXSess2UQAj1K80xmSuubrK5gw+YkWnBiyNyiY5mQfQ@mail.gmail.com> (Magnus Damm's message of "Tue, 27 Mar 2012 11:46:49 +0900")
Hi,
On Mon, Mar 26 2012, Magnus Damm wrote:
>> Do you have a feeling of if it it worth trying to start with a value close
>> to 400kHz or if it would be better to simplify the code? I can try and
>> measure the difference in start up time for particular hardware
>> combinations, but I'm not sure how far that will get us.
>
> I believe the correct way is to program the hardware to be as close to
> 400 kHz as possible. I may be wrong, but I guess that slower than 400
> kHz is also acceptable during the initial phase, but faster may mean
> out of spec. For optimal performance the code may need to be reworked
> to support both correct and slow 400 kHz as well as whatever high
> frequencies needed for fast transfers.
Hm, I think I'm missing something -- you shouldn't need to optimize f_min
in the driver at all, because the core handles retrying at lower frequencies
in the init phase (before switching to the higher frequency that comes from
the CSD) and it always begins at 400KHz if that's above f_min. In core.c:
void mmc_rescan(struct work_struct *work)
{
static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
...
for (i = 0; i < ARRAY_SIZE(freqs); i++) {
if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min)))
...
So, why would you want f_min to be near 400KHz?
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2012-03-27 3:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 9:02 [PATCH 0/2] MMCIF Clock Fixes Simon Horman
2012-03-21 9:02 ` [PATCH 1/2] mmc: sh_mmcif: double clock speed Simon Horman
2012-03-24 17:56 ` Guennadi Liakhovetski
2012-03-26 2:21 ` Simon Horman
2012-03-21 9:02 ` [PATCH 2/2] mmc: sh_mmcif: mmc->f_max should be half of the bus clock Simon Horman
2012-03-24 18:06 ` Guennadi Liakhovetski
[not found] ` <20120325223033.GA6860@verge.net.au>
2012-03-26 5:45 ` Yusuke Goda
2012-03-26 5:52 ` Simon Horman
2012-03-26 6:04 ` Yusuke Goda
2012-03-26 6:17 ` Magnus Damm
2012-03-26 7:04 ` Guennadi Liakhovetski
2012-03-27 7:53 ` Guennadi Liakhovetski
2012-03-27 8:14 ` Simon Horman
2012-03-27 1:43 ` Simon Horman
2012-03-27 2:46 ` Magnus Damm
2012-03-27 3:20 ` Chris Ball [this message]
2012-03-27 4:02 ` Magnus Damm
2012-03-27 6:01 ` Simon Horman
2012-03-27 6:37 ` Magnus Damm
2012-03-27 7:12 ` Simon Horman
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=87limmybjo.fsf@laptop.org \
--to=cjb@laptop.org \
--cc=g.liakhovetski@gmx.de \
--cc=hiepcm@gmail.com \
--cc=horms@verge.net.au \
--cc=lethal@linux-sh.org \
--cc=linux-mmc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=yusuke.goda.sx@renesas.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