devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers
@ 2014-12-01 11:41 Viresh Kumar
  2014-12-01 11:41 ` [RFC V1 1/8] cpufreq: Reuse "compatible" binding to probe " Viresh Kumar
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Viresh Kumar @ 2014-12-01 11:41 UTC (permalink / raw)
  To: Rafael Wysocki, Arnd Bergmann, Rob Herring, Grant Likely
  Cc: linaro-kernel, linux-pm, Nishanth Menon, Sudeep Holla,
	Stephen Boyd, devicetree, santosh shilimkar, Lorenzo Pieralisi,
	Mike Turquette, kesavan.abhilash, catalin.marinas, k.chander,
	olof, ta.omasab, linux-arm-kernel, Viresh Kumar

Hi Guys,

DT based cpufreq drivers doesn't require much support from platform code now a
days as most of the stuff is moved behind generic APIs. Like clk APIs for
changing clock rates, regulator APIs for changing voltages, etc.

One of the bottleneck still left was how to select which cpufreq driver to probe
for a given platform as there might be multiple drivers available.

Traditionally, we used to create platform devices from machine specific code
which binds with a cpufreq driver. And while we moved towards DT based device
creation, these devices stayed as is.

The problem is getting worse now as we have architectures now with Zero platform
specific code. Forcefully these platforms have to create a new file in
drivers/cpufreq/ to just add these platform devices in order to use the generic
drivers like cpufreq-dt.c.

This has been discussed again and again, but with no solution yet. Last it was
discussed here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256154.html

This patch is an attempt towards getting the bindings.

We only need to have cpufreq drivers name string present in "compatible"
property for the root node.. If a cpufreq driver with DT support exists with
that name, then cpufreq core will create a platform device for that.

The first patch presents the new binding, second one creates another file
responsible for creating platform devices for all DT based cpufreq drivers.

And later patches update platforms to migrate to it one by one.

A BLACKLIST of platforms already supported by these drivers is also created for
backward compatibility of newer kernels with older DTs. And so for such
platforms DT files aren't updated.

An initial RFC that presented the idea was discussed here:
https://www.mail-archive.com/devicetree@vger.kernel.org/msg52509.html

Tested-ON: Exynos5250. (The last patch for exynos depends on some commits to be
upstreamed in 3.19, presented here just for testing).

Viresh Kumar (8):
  cpufreq: Reuse "compatible" binding to probe cpufreq drivers
  cpufreq: Create cpufreq platform-device based on "compatible" from DT
  cpufreq: imx: reuse dt_device.c to create cpufreq platform device
  cpufreq: mvebu: reuse dt_device.c to create cpufreq platform device
  cpufreq: shmobile: reuse dt_device.c to create cpufreq platform device
  cpufreq: zynq: reuse dt_device.c to create cpufreq platform device
  cpufreq: calxeda: reuse dt_device.c to create cpufreq platform device
  cpufreq: exynos: reuse dt_device.c to create cpufreq platform device

 .../devicetree/bindings/cpufreq/drivers.txt        | 46 +++++++++++++++
 arch/arm/mach-exynos/exynos.c                      | 27 +++------
 arch/arm/mach-imx/imx27-dt.c                       |  4 --
 arch/arm/mach-imx/mach-imx51.c                     |  3 -
 arch/arm/mach-mvebu/pmsu.c                         |  1 -
 arch/arm/mach-shmobile/Makefile                    |  1 -
 arch/arm/mach-shmobile/common.h                    |  7 ---
 arch/arm/mach-shmobile/cpufreq.c                   | 17 ------
 arch/arm/mach-zynq/common.c                        |  2 -
 drivers/cpufreq/Makefile                           |  2 +-
 drivers/cpufreq/dt_device.c                        | 68 ++++++++++++++++++++++
 drivers/cpufreq/highbank-cpufreq.c                 |  5 --
 12 files changed, 123 insertions(+), 60 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/drivers.txt
 delete mode 100644 arch/arm/mach-shmobile/cpufreq.c
 create mode 100644 drivers/cpufreq/dt_device.c

-- 
2.0.3.693.g996b0fd


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-12-02  8:20 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-01 11:41 [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers Viresh Kumar
2014-12-01 11:41 ` [RFC V1 1/8] cpufreq: Reuse "compatible" binding to probe " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 2/8] cpufreq: Create cpufreq platform-device based on "compatible" from DT Viresh Kumar
2014-12-01 11:41 ` [RFC V1 3/8] cpufreq: imx: reuse dt_device.c to create cpufreq platform device Viresh Kumar
2014-12-01 11:41 ` [RFC V1 4/8] cpufreq: mvebu: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 5/8] cpufreq: shmobile: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 6/8] cpufreq: zynq: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 7/8] cpufreq: calxeda: " Viresh Kumar
2014-12-01 11:41 ` [RFC V1 8/8] cpufreq: exynos: " Viresh Kumar
2014-12-01 12:54 ` [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers Arnd Bergmann
2014-12-01 13:29   ` Viresh Kumar
2014-12-01 13:35     ` Sudeep Holla
2014-12-01 14:11       ` Arnd Bergmann
2014-12-01 14:48         ` Viresh Kumar
2014-12-01 15:07         ` Sudeep Holla
2014-12-01 16:03           ` Arnd Bergmann
2014-12-01 16:56             ` Sudeep Holla
2014-12-01 14:05     ` Arnd Bergmann
2014-12-01 14:48       ` Viresh Kumar
2014-12-01 14:59         ` Arnd Bergmann
2014-12-02  8:20           ` Thomas Petazzoni
2014-12-01 18:14   ` Rob Herring

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).