]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: st: enable selective initialization based on the platform
authorSudeep Holla <Sudeep.Holla@arm.com>
Wed, 27 Apr 2016 16:18:59 +0000 (17:18 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Apr 2016 13:25:56 +0000 (15:25 +0200)
commit06b1fdc230339e5c4cb2bc02e3e4480c504135c6
tree8f9cc83eadb3dc5bd51ce3ed1279088521ded68c
parentf17796592b64d87465a5eb1e260e64cb7e0a9719
cpufreq: st: enable selective initialization based on the platform

The sti-cpufreq does unconditional registration of the cpufreq-dt driver
which causes issue on an multi-platform build. For example, on Vexpress
TC2 platform, we get the following error on boot:

cpu cpu0: OPP-v2 not supported
cpu cpu0: Not doing voltage scaling
cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
for cpu:0, -19
cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
...
arm_big_little: bL_cpufreq_register: Failed registering platform driver:
vexpress-spc, err: -17

The actual driver fails to initialise as cpufreq-dt is probed
successfully, which is incorrect. This issue can happen to any platform
not using cpufreq-dt in a multi-platform build.

This patch adds a check to do selective initialization of the driver.

Fixes: 39d7417d4b19 (cpufreq: st: Provide runtime initialised driver for ST's platforms)
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/sti-cpufreq.c