All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	Tony Lindgren <tony@atomide.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Shawn Guo <shawn.guo@linaro.org>,
	linux-pm@vger.kernel.org,
	Mark Langsdorf <mark.langsdorf@calxeda.com>
Subject: Re: omap cpufreq driver in multi-platform kernels
Date: Wed, 27 Mar 2013 12:02:21 -0500	[thread overview]
Message-ID: <20130327170221.GA32231@kahuna> (raw)
In-Reply-To: <5153207A.4050109@gmail.com>

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/
-- 
Regards,
Nishanth Menon

WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: omap cpufreq driver in multi-platform kernels
Date: Wed, 27 Mar 2013 12:02:21 -0500	[thread overview]
Message-ID: <20130327170221.GA32231@kahuna> (raw)
In-Reply-To: <5153207A.4050109@gmail.com>

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/
-- 
Regards,
Nishanth Menon

  reply	other threads:[~2013-03-27 17:02 UTC|newest]

Thread overview: 30+ 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  1:49 ` Rob Herring
2013-03-27  2:23 ` Paul Walmsley
2013-03-27  2:23   ` Paul Walmsley
2013-03-27 13:32   ` Nishanth Menon
2013-03-27 13:32     ` Nishanth Menon
2013-03-27 16:38     ` Rob Herring
2013-03-27 16:38       ` Rob Herring
2013-03-27 17:02       ` Nishanth Menon [this message]
2013-03-27 17:02         ` Nishanth Menon
2013-03-27 17:53         ` Kevin Hilman
2013-03-27 17:53           ` Kevin Hilman
2013-03-27 17:56           ` Nishanth Menon
2013-03-27 17:56             ` Nishanth Menon
2013-03-30 22:21             ` Paul Walmsley
2013-03-30 22:21               ` Paul Walmsley
2013-04-01 17:20               ` Eduardo Valentin
2013-04-01 17:20                 ` Eduardo Valentin
2013-04-01 19:14                 ` Nishanth Menon
2013-04-01 19:14                   ` Nishanth Menon
2013-04-01 19:27                 ` Paul Walmsley
2013-04-01 19:27                   ` Paul Walmsley
2013-04-01 19:46               ` Rob Herring
2013-04-01 19:46                 ` Rob Herring
2013-04-01 21:58                 ` Paul Walmsley
2013-04-01 21:58                   ` Paul Walmsley
2013-03-27 17:48     ` Paul Walmsley
2013-03-27 17:48       ` Paul Walmsley
2013-03-27 18:02       ` Nishanth Menon
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=20130327170221.GA32231@kahuna \
    --to=nm@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.langsdorf@calxeda.com \
    --cc=paul@pwsan.com \
    --cc=robherring2@gmail.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 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.