From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2] cpufreq for freescale mx51
Date: Mon, 18 Oct 2010 10:31:06 +0200 [thread overview]
Message-ID: <20101018083106.GK28242@pengutronix.de> (raw)
In-Reply-To: <AANLkTimprV8=cAD-CfiAgLTCFyj=wc7qMj0sPDCUpWDC@mail.gmail.com>
Hi Yong,
On Mon, Oct 18, 2010 at 01:43:43PM +0800, Yong Shen wrote:
> Hi Sascha,
>
> Thanks for your thorough review. I have two feedbacks to your commends.
> Sorry for delayed response, cause I had a hard time due to my computer crash
> and data loss.
>
> > diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
> > > index 2d37785..83add9c 100644
> > > --- a/arch/arm/mach-mx5/cpu.c
> > > +++ b/arch/arm/mach-mx5/cpu.c
> > > @@ -22,6 +22,8 @@ static int cpu_silicon_rev = -1;
> > >
> > > #define SI_REV 0x48
> > >
> > > +struct cpu_wp *(*get_cpu_wp)(int *wp);
> > > +
> >
> > This is not needed.
> >
> This is needed, otherwise it does not pass compile.
This hunk is the only change to arch/arm/mach-mx5/cpu.c and get_cpu_wp
is introduced with this patch, so how can this break compilation?
Also, you should move this to a header file. Otherwise you risk of
having multiple (and possibly different) declarations of the same
function which can lead to hard to find bugs.
>
> >
> > > + return ret;
> > > + }
> > > +
> > > + cpufreq_frequency_table_get_attr(imx_freq_table, policy->cpu);
> > > + return 0;
> > > +}
> > > +
> > > +static int mxc_cpufreq_exit(struct cpufreq_policy *policy)
> > > +{
> > > + cpufreq_frequency_table_put_attr(policy->cpu);
> > > +
> > > + /* Reset CPU to 665MHz */
> > > + set_cpu_freq(arm_normal_clk);
> >
> > arm_normal_clk is initialized to cpu_freq_khz_max * 1000 and never touched
> > again. It would be clearer here to remove arm_normal_clk and write
> > cpu_freq_khz_max * 1000 directly here. Then you can also remove the
> > comment which is wrong for most i.MXs, even for the i.MX51.
> >
> >
> Actually, this is arm_normal_clk is touched later in mxc_cpufreq_exit()
> fuction.
It's *read* but not changed. That's why I suggested to just remove
arm_normal_clk and instead do a set_cpu_freq(cpu_freq_khz_max * 1000) in
mxc_cpufreq_exit.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2010-10-18 8:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 8:08 cpufreq for freescale mx51 yong.shen at linaro.org
2010-10-08 8:08 ` [PATCHv2] " yong.shen at linaro.org
2010-10-13 10:38 ` Amit Kucheria
2010-10-18 5:46 ` Yong Shen
2010-10-13 17:54 ` Sascha Hauer
2010-10-18 5:43 ` Yong Shen
2010-10-18 8:31 ` Sascha Hauer [this message]
2010-10-18 9:08 ` Yong Shen
2010-10-18 9:31 ` Sascha Hauer
2010-10-19 8:31 ` Yong Shen
[not found] <1285738417-1638-1-git-send-email-yong.shen@linaro.org>
2010-09-30 10:48 ` [PATCH] " Amit Kucheria
2010-10-06 9:51 ` Sascha Hauer
2010-10-07 3:36 ` Yong Shen
2010-10-07 7:30 ` Sascha Hauer
2010-10-07 12:00 ` Yong Shen
2010-10-12 7:11 ` [PATCHv2] " Yong Shen
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=20101018083106.GK28242@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).