Re: [patch 2/5] s3cmci: cpufreq support

Pierre Ossman
2008-10-12T08:58:53Z

On Fri, 10 Oct 2008 11:32:23 +0100
Ben Dooks <ben-linux@fluff.org> wrote:

> + host = container_of(nb, struct s3cmci_host, freq_transition);
> + newclk = clk_get_rate(host->clk);
> + mmc = host->mmc;
> +
> + if ((val == CPUFREQ_PRECHANGE && host->clk_rate > newclk) ||
> + (val == CPUFREQ_POSTCHANGE && host->clk_rate < newclk)) {

Isn't this backwards? The goal should be to avoid overclocking the
card, so if the old clock (which I assume is clk_rate) is slower than
the new clock (newclk), then we should adjust before the change happens,
temporarily underclocking the card.

(and vice versa for when the old clock is faster than the new clock)

--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.