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: Fri, 15 Jul 2005 18:41:15 +0200 [thread overview]
Message-ID: <20050715164115.GA3240@isilmar.linta.de> (raw)
In-Reply-To: <1121341256.10537.12.camel@icampbell-debian>
Hi,
On Thu, Jul 14, 2005 at 12:40:56PM +0100, Ian Campbell wrote:
> +#define DEBUG 0
> +
> +#ifdef DEBUG
> +static unsigned int freq_debug = DEBUG;
> +module_param(freq_debug, int, 0);
> +MODULE_PARM_DESC(freq_debug, "Set the debug messages to on=1/off=0");
> +#else
> +#define freq_debug 0
> +#endif
Please use the cpufreq debug infrastructure for this:
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "pxa", msg)
> +typedef struct {
> + unsigned int khz;
> + unsigned int membus;
> + unsigned int cccr;
> + unsigned int div2;
> +} pxa_freqs_t;
Don't use typedefs, please. Just name it "struct pxa_freqs"
> +static void pxa_select_freq_table(struct cpufreq_policy *policy,
> + pxa_freqs_t ** settings,
> + struct cpufreq_frequency_table **table)
> +{
> + if (strcmp(policy->governor->name, "performance") == 0) {
> + if (settings)
> + *settings = pxa255_run_freqs;
> + if (table)
> + *table = pxa255_run_freq_table;
> + } else {
> + if (settings)
> + *settings = pxa255_turbo_freqs;
> + if (table)
> + *table = pxa255_turbo_freq_table;
> + }
> +}
As noted by Eric Piel already, please use a module parameter combined with a
sysfs file instead.
> + if (freq_debug) {
> + printk("Verified CPU policy: %dKhz min to %dKhz max\n",
> + policy->min, policy->max);
> + }
dprintk("Verified ...);
> + cpumask_t cpus_allowed;
Is this a SMP-capable platform?
> + policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
1000000
> +1.1 ARM, PXA
> +------------
>
> The following ARM processors are supported by cpufreq:
>
> ARM Integrator
> ARM-SA1100
> ARM-SA1110
> +Intel PXA
Is the PXA just a sub-architecture of ARM?
> choice
> prompt "Default CPUFreq governor"
> - default CPU_FREQ_DEFAULT_GOV_USERSPACE if CPU_FREQ_SA1100 || CPU_FREQ_SA1110
> + default CPU_FREQ_DEFAULT_GOV_USERSPACE if CPU_FREQ_SA1100 || CPU_FREQ_SA1110 || CPU_FREQ_PXA
Why is that?
Except the two-tables-issue I'd like to see solved differently, it's good
code IMHO.
Dominik
next prev parent reply other threads:[~2005-07-15 16:41 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 [this message]
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
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=20050715164115.GA3240@isilmar.linta.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.