From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Ian Campbell <icampbell@arcom.com>
Cc: cpufreq@lists.linux.org.uk
Subject: Re: [PATCH] CPUFreq Support for PXA255
Date: Sat, 23 Jul 2005 21:16:59 +0200 [thread overview]
Message-ID: <20050723191659.GA10331@dominikbrodowski.de> (raw)
In-Reply-To: <1121768102.29501.47.camel@icampbell-debian>
Hi,
On Tue, Jul 19, 2005 at 11:15:02AM +0100, Ian Campbell wrote:
> +static int pxa_set_target(struct cpufreq_policy *policy,
> + unsigned int target_freq, unsigned int relation)
> +{
> + int idx;
> + struct cpufreq_freqs freqs;
> + struct pxa_freqs *pxa_freq_settings;
> + struct cpufreq_frequency_table *pxa_freqs_table;
> + unsigned long flags;
> + unsigned int unused;
> + unsigned int preset_mdrefr, postset_mdrefr;
> + void *ramstart;
> +
> + /* Get the current policy */
> + pxa_select_freq_table(policy, &pxa_freq_settings, &pxa_freqs_table);
In my opinion you should only switch between the tables in verify. Only then
can we assure that the ->min and ->max values provided are OK at this
moment.
> + /* set default policy and cpuinfo */
> + policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
> + policy->cpuinfo.max_freq = max_frequency;
> + policy->cpuinfo.min_freq = PXA25x_MIN_FREQ;
> + policy->cpuinfo.transition_latency = 1000000; /* FIXME: 1 ms, assumed */
> + policy->cur = get_clk_frequency_khz(0); /* current freq */
> + policy->min = policy->max = policy->cur;
Better set policy->min to cpuinfo.min_freq and ->max to cpuinfo.max_freq.
> +static struct freq_attr* pxa_cpufreq_attr[] = {
> + &cpufreq_freq_attr_scaling_available_freqs,
Tab, not space
Looks good, thanks!
Dominik
next prev parent reply other threads:[~2005-07-23 19:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-14 11:40 [PATCH] CPUFreq Support for PXA255 Ian Campbell
2005-07-14 13:32 ` Eric Piel
2005-07-14 14:11 ` Ian Campbell
2005-07-15 16:41 ` Dominik Brodowski
2005-07-18 11:02 ` Ian Campbell
2005-07-18 12:01 ` Dominik Brodowski
2005-07-18 12:11 ` Ian Campbell
2005-07-18 14:31 ` Ian Campbell
2005-07-18 15:03 ` Dominik Brodowski
2005-07-18 15:06 ` Ian Campbell
2005-07-19 10:15 ` Ian Campbell
2005-07-23 19:16 ` Dominik Brodowski [this message]
2005-07-25 11:54 ` Ian Campbell
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=20050723191659.GA10331@dominikbrodowski.de \
--to=linux@dominikbrodowski.net \
--cc=cpufreq@lists.linux.org.uk \
--cc=icampbell@arcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.