cpufreq: Update boost flag while initializing freq table from OPPs
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 29 Jul 2015 10:53:08 +0000 (16:23 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Aug 2015 01:25:23 +0000 (03:25 +0200)
cpufreq table entries for OPPs with turbo modes enabled, should be
marked with CPUFREQ_BOOST_FREQ flag. This ensures that these states are
only used while operating in boost or turbo mode.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
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>
drivers/cpufreq/cpufreq_opp.c

index 773bcde893c0472b3ecf8f2e9e3a5356d532a402..0f5e6d5f6da0a6d29788a79eb37cc51d2430140b 100644 (file)
@@ -75,6 +75,10 @@ int dev_pm_opp_init_cpufreq_table(struct device *dev,
                }
                freq_table[i].driver_data = i;
                freq_table[i].frequency = rate / 1000;
+
+               /* Is Boost/turbo opp ? */
+               if (dev_pm_opp_is_turbo(opp))
+                       freq_table[i].flags = CPUFREQ_BOOST_FREQ;
        }
 
        freq_table[i].driver_data = i;