From: Nishanth Menon <nm@ti.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Shawn Guo <shawn.guo@linaro.org>,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Mark Langsdorf <mark.langsdorf@calxeda.com>,
Tony Lindgren <tony@atomide.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [PATCH v2] cpufreq: instantiate cpufreq-cpu0 as a platform_driver
Date: Fri, 22 Mar 2013 11:01:30 -0500 [thread overview]
Message-ID: <20130322160038.GA4146@kahuna> (raw)
In-Reply-To: <Pine.LNX.4.64.1303221600060.12375@axis700.grange>
-Anil as the mail id does not seem to be accepted by TI mail server
anymore.
On 16:47-20130322, Guennadi Liakhovetski wrote:
> On Tue, 29 Jan 2013, Shawn Guo wrote:
>
> > As multiplatform build is being adopted by more and more ARM platforms,
> > initcall function should be used very carefully. For example, when
> > GENERIC_CPUFREQ_CPU0 is built in the kernel, cpu0_cpufreq_driver_init()
> > will be called on all the platforms to initialize cpufreq-cpu0 driver.
> >
> > To eliminate this undesired the effect, the patch changes cpufreq-cpu0
> > driver to have it instantiated as a platform_driver. Then it will only
> > run on platforms that create the platform_device "cpufreq-cpu0".
>
> Sorry, confused. Before this used to be a generic cpufreq driver, usable
> on all (DT-enabled only) platforms. You just had to provide an OPP table,
> a clock, a regulator, similar to this
>
> http://thread.gmane.org/gmane.linux.kernel.cpufreq/9510/focus=9509
>
> (also see the complete thread for more information). Now this won't work
> obviously. Instead we now need a pseudo platform device to instantiate
> cpufreq-cpu0. This device cannot be put in DT, because it doesn't describe
> real hardware. So, we have to add register it from the board specific .c
> code, which we actually want to get rid of... Is this really what we want?
>
> What about other cpufreq drivers? They have the same problem on
> multiplatform builds, right? Say, s3c2416-cpufreq.c. It also just
> initialises itself and starts looking for a clock, names "msysclk" with a
> NULL device pointer etc. Don't we need a common approach for cpufreq
> driver initialisation?
>
> The decision which cpufreq driver to use is SoC-specific, right? We're
> unlikely to have several boards, using the same SoC, wishing to use
> different cpufreq drivers? The decision _whether_ or not to enable it and
> _which_ resources to use might be board-specific. So, how about adding a
> cpufreq call something like
>
> cpufreq_driver_request("cpufreq-driver-name");
>
> to be called by SoC-specific code. You can say it is not much different
> from adding a virtual device, but firstly I think such a use of a platform
> device is really an overkill. Secondly you still run a danger, that
> several platforms, built into a single image, register several devices for
> different cpufreq drivers, or even for one... With a special call you know
> there can be only one and you return -EBUSY to all further calls to that
> function.
Just an note on this specific patch - I made this generic handling for
OMAP OPP handling in my series:
http://marc.info/?l=linux-omap&m=136371580826031&w=2
Handling non-DT and DT enabled boots are key for us as well here.
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2013-03-22 16:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 2:53 [PATCH v2] cpufreq: instantiate cpufreq-cpu0 as a platform_driver Shawn Guo
2013-01-29 4:51 ` Viresh Kumar
2013-01-30 7:10 ` AnilKumar, Chimata
2013-01-30 13:40 ` Rafael J. Wysocki
2013-01-30 13:49 ` Shawn Guo
2013-01-30 13:57 ` Rafael J. Wysocki
2013-03-22 15:47 ` Guennadi Liakhovetski
2013-03-22 16:01 ` Nishanth Menon [this message]
2013-03-23 6:32 ` Shawn Guo
2013-03-24 10:06 ` Guennadi Liakhovetski
2013-03-24 10:24 ` Guennadi Liakhovetski
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=20130322160038.GA4146@kahuna \
--to=nm@ti.com \
--cc=cpufreq@vger.kernel.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.langsdorf@calxeda.com \
--cc=rafael.j.wysocki@intel.com \
--cc=shawn.guo@linaro.org \
--cc=tony@atomide.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 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).