public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* clock divisor in  mmc_omap_set_ios in drivers/mmc/omap.c wrong
@ 2006-11-10  9:54 Frantisek Dufka
  2006-11-16  1:05 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Frantisek Dufka @ 2006-11-10  9:54 UTC (permalink / raw)
  To: linux-omap-open-source

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-16  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10  9:54 clock divisor in mmc_omap_set_ios in drivers/mmc/omap.c wrong Frantisek Dufka
2006-11-16  1:05 ` Tony Lindgren
2006-11-16  8:15   ` Frantisek Dufka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox