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

From: Pierre Ossman
Date: Sun Oct 12 2008 - 04:58:53 EST


On Fri, 10 Oct 2008 11:32:23 +0100
Ben Dooks <ben-linux@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/