From: khilman@linaro.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: omap cpufreq driver in multi-platform kernels
Date: Wed, 27 Mar 2013 10:53:57 -0700 [thread overview]
Message-ID: <87d2uk91ai.fsf@linaro.org> (raw)
In-Reply-To: <20130327170221.GA32231@kahuna> (Nishanth Menon's message of "Wed, 27 Mar 2013 12:02:21 -0500")
Hi Nishanth,
Nishanth Menon <nm@ti.com> writes:
> On 11:38-20130327, Rob Herring wrote:
>> On 03/27/2013 08:32 AM, Nishanth Menon wrote:
>> > On 02:23-20130327, Paul Walmsley wrote:
>> >> Hi
>> >>
>> >> On Tue, 26 Mar 2013, Rob Herring wrote:
>> >>
>> >>> The omap cpufreq driver causes problems in multi-platform kernels
>> >>> because it unconditionally registers with the cpufreq core and does not
>> >>> check sufficiently that it is running on an omap platform. So on a
>> >>> kernel with highbank and omap drivers booted on highbank, the
>> >>> cpufreq-cpu0 driver fails to init. Any suggestions for how to fix? For
>> >>> DT this could just be several of_machine_is_compatible checks, but I'm
>> >>> not really sure for non-DT. Converting the driver to a platform driver
>> >>> would be another option.
>> >>
>> >> We could move the
>> >>
>> >> mpu_clk = clk_get(NULL, "cpufreq_ck");
>> >>
>> >> down to omap_cpufreq_init(), and bail out early if the clock alias doesn't
>> >> exist. (Presumably we'd also want to change the clock role name if we did
>> >> that, to something like "omap_cpufreq_ck".)
>> >>
>> >> Experimental patch follows, comments welcome.
>> > We should deprecate usage on omap-cpufreq driver eventually, instead go
>> > towards embracing the SoC generic implementation of cpufreq-cpu0 driver
>> > IMHO.
>> > http://marc.info/?l=linux-omap&m=136371580826031&w=2
>> > is the series to support cpufreq_cpu0 driver in DT based boot.
>> > Would you think this approach is sane?
>>
>> That only solves the problem for DT, but not non-DT. My understanding is
>> non-DT omap platforms will be around for some time.
>>
> Yes, that is true. There are multiple parts of the problem:
> part #1: DT boot:
> https://patchwork.kernel.org/patch/2303471/ prevents omap-cpufreq from
> interfering in DT enabled boot. (seeing DT entries for highbank it
> probably might help in the specific platform)
> part #2: non DT boot:
> you would not have cpu DT nodes in the system. So, cpufreq-cpu0 wont come
> into play[1]
> Now the conflict between omap-cpufreq Vs non-dt platform cpufreq driver:
> other than registering an dummy device and moving omap_cpufreq_init to
> it (similar to what was done in cpufreq-cpu0[2]) I dont see how we can
> continue to keep multiple platforms sane in mult-arch non-dt boot.
>
> [1] https://patchwork.kernel.org/patch/2351601/
> [2] https://patchwork.kernel.org/patch/2067751/
I think the platform_device conversion is the way to go. I think you
should do that instead of PATCH 8/8 of your OMAP conversion to the
generic driver[1].
I'll have a closer look at that series also and comment there as well.
Kevin
[1] http://marc.info/?l=linux-omap&m=136371580826031&w=2
next prev parent reply other threads:[~2013-03-27 17:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 1:49 omap cpufreq driver in multi-platform kernels Rob Herring
2013-03-27 2:23 ` Paul Walmsley
2013-03-27 13:32 ` Nishanth Menon
2013-03-27 16:38 ` Rob Herring
2013-03-27 17:02 ` Nishanth Menon
2013-03-27 17:53 ` Kevin Hilman [this message]
2013-03-27 17:56 ` Nishanth Menon
2013-03-30 22:21 ` Paul Walmsley
2013-04-01 17:20 ` Eduardo Valentin
2013-04-01 19:14 ` Nishanth Menon
2013-04-01 19:27 ` Paul Walmsley
2013-04-01 19:46 ` Rob Herring
2013-04-01 21:58 ` Paul Walmsley
2013-03-27 17:48 ` Paul Walmsley
2013-03-27 18:02 ` Nishanth Menon
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=87d2uk91ai.fsf@linaro.org \
--to=khilman@linaro.org \
--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).