linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/8] cpufreq: add driver for Armada XP
Date: Fri, 4 Jul 2014 13:12:47 +0200	[thread overview]
Message-ID: <20140704131247.2c8ecde2@free-electrons.com> (raw)
In-Reply-To: <CAKohponuvPd1kWDdB66kxd8TxxYqQ219jCq2D2RGhMHAuZTSWA@mail.gmail.com>

Dear Viresh Kumar,

Thanks for your feedback!

On Fri, 4 Jul 2014 15:25:35 +0530, Viresh Kumar wrote:
> On 4 July 2014 15:14, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > This commit adds a simple cpufreq driver for the Armada XP SoC, which
> > has one separately controllable clock for each CPU. For this reason,
> > the existing cpufreq-cpu0 generic driver cannot be used because it
> > currently assumes that there is only one clock controlling the
> > frequency of all CPUs.
> >
> > There are on-going discussions on extending the cpufreq-cpu0 to cover
> > the case of having one clock for each CPU, but there are still some
> > unresolved issues to get this extended cpufreq-cpu0 driver merged.
> 
> Exactly, and those changes would get merged in one form or the other.
> Surely in 3.17 atleast, if not 3.16 as we are already reaching rc4..
> 
> So, it would be great if you can test on top of those changes to see if
> something isn't solved for your platform yet?
> 
> git://git.linaro.org/people/viresh.kumar/linux.git cpufreq/cpu0-krait-v3

One other problem with cpufreq-cpu0 is that it assumes the Device Tree
can contain a static OPP table, with the frequency/voltage points.
Unfortunately, in the case of the Armada XP platform, this is not
possible, because we cannot hardcode into the Device Tree the possible
CPU frequencies.

The nominal CPU frequency is selected by Sample on Reset pins (i.e pins
of the CPUs that are sampled during the reset sequence) and can
therefore change from one board to the other, and they can also be
changed via special U-Boot commands. And the frequencies supported by
cpufreq are the nominal frequency of the CPU as determined by the
sample at reset pins, and half of this frequency.

That's why the proposed armadaxp-cpufreq driver does not hardcode the
possible frequencies, but instead creates the frequency table by using
the current CPU frequency (nominal frequency) and half of it.

This doesn't work very well with the idea of having the OPP table
statically encoded in to the Device Tree. Options are:

 - Improve the cpufreq-cpu0 driver so that the OPP table can be passed
   through platform_data, and therefore built dynamically by the
   platform code and passed when registering the cpufreq
   platform_device.

 - Dynamically build/update the OPP table in the Device Tree.

Which option do you think is appropriate here?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-07-04 11:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04  9:44 [PATCH 0/8] cpufreq support for Marvell Armada XP Thomas Petazzoni
2014-07-04  9:44 ` [PATCH 1/8] clk: add an APPLY_RATE_CHANGE notifier event during clk_set_rate() Thomas Petazzoni
2014-07-04  9:44 ` [PATCH 2/8] cpufreq: add driver for Armada XP Thomas Petazzoni
2014-07-04  9:55   ` Viresh Kumar
2014-07-04 11:12     ` Thomas Petazzoni [this message]
2014-07-04 13:25       ` Andrew Lunn
2014-07-04 13:52       ` Lucas Stach
2014-07-04 14:15         ` Andrew Lunn
2014-07-04 16:12           ` Viresh Kumar
2014-07-16 14:02     ` Thomas Petazzoni
2014-07-16 15:25       ` Viresh Kumar
2014-07-16 15:28         ` Thomas Petazzoni
2014-07-16 15:32           ` Viresh Kumar
2014-07-16 15:47             ` Thomas Petazzoni
2014-07-16 16:03               ` Viresh Kumar
2014-07-04  9:44 ` [PATCH 3/8] clk: mvebu: extend clk-cpu for dynamic frequency scaling Thomas Petazzoni
2014-07-04  9:44 ` [PATCH 4/8] ARM: mvebu: ensure CPU clocks are enabled Thomas Petazzoni
2014-07-04  9:45 ` [PATCH 5/8] ARM: mvebu: extend PMSU code to support dynamic frequency scaling Thomas Petazzoni
2014-07-04  9:45 ` [PATCH 6/8] ARM: mvebu: update Armada XP DT for " Thomas Petazzoni
2014-07-04  9:45 ` [PATCH 7/8] ARM: mvebu: allow enabling of cpufreq on Armada XP Thomas Petazzoni
2014-07-04  9:45 ` [PATCH 8/8] ARM: mvebu: update mvebu_v7_defconfig with cpufreq support Thomas Petazzoni

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=20140704131247.2c8ecde2@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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).