summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq-dt.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-07-29 13:53:11 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-08-07 04:25:24 +0300
commitd15fa86276e8515443251c0d18930e392bc5afc5 (patch)
tree6a22348534638429e1d5545efe1e2d03f435cb17 /drivers/cpufreq/cpufreq-dt.c
parent2e02d8723edf6599988852a8ade8f83b2f766cb8 (diff)
downloadlinux-d15fa86276e8515443251c0d18930e392bc5afc5.tar.xz
cpufreq: dt: Add support for turbo/boost mode
With opp-v2 DT bindings, few OPPs can be used only for the boost mode. But using such OPPs require the boost mode to be supported by cpufreq driver. We will parse DT bindings only during ->init() and so can enable boost support only after registering cpufreq driver. This enables boost support as soon as any policy has boost/turbo OPPs for its CPUs. We don't need to disable boost support as that is done by the core, when the driver is unregistered. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq-dt.c')
-rw-r--r--drivers/cpufreq/cpufreq-dt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index c6e7033076de..b9259abd25d4 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -330,6 +330,14 @@ static int cpufreq_init(struct cpufreq_policy *policy)
goto out_free_cpufreq_table;
}
+ /* Support turbo/boost mode */
+ if (policy_has_boost_freq(policy)) {
+ /* This gets disabled by core on driver unregister */
+ ret = cpufreq_enable_boost_support();
+ if (ret)
+ goto out_free_cpufreq_table;
+ }
+
policy->cpuinfo.transition_latency = transition_latency;
of_node_put(np);