public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Frantisek Dufka <dufkaf@seznam.cz>
To: linux-omap-open-source@linux.omap.com
Subject: clock divisor in  mmc_omap_set_ios in drivers/mmc/omap.c wrong
Date: Fri, 10 Nov 2006 10:54:25 +0100	[thread overview]
Message-ID: <45544C51.1050106@seznam.cz> (raw)

Hello,

anyone knows real reason why the divisor is intentionally lowered in
mmc_omap_set_ios so the result frequency is _not_ near the one requested?

First there is a code which tries hard to select the divisor that
produces highest possible frequency which is lower or equal to the
requested one

        fclk_rate = clk_get_rate(host->fclk);
        dsor = fclk_rate / freq;
        if (dsor < 1)
                dsor = 1;
        if (fclk_rate / dsor > freq)
                dsor++;

        if (dsor > 250)
                dsor = 250;

and then there is additional

        dsor++;

which intentionally makes resulting frequency lower by unknown factor.

If this is some workaround for specific cards maybe it should be solved
in different place like blacklisting offending cards and actually
requesting lower frequency for them. Or is  there some real reason?

For requested 20Mhz MMC bus speed and 48Mhz omap clock current code
results in 12Mhz instead of 16Mhz.

Frantisek

             reply	other threads:[~2006-11-10  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10  9:54 Frantisek Dufka [this message]
2006-11-16  1:05 ` clock divisor in mmc_omap_set_ios in drivers/mmc/omap.c wrong Tony Lindgren
2006-11-16  8:15   ` Frantisek Dufka

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=45544C51.1050106@seznam.cz \
    --to=dufkaf@seznam.cz \
    --cc=linux-omap-open-source@linux.omap.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