Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] cpufreq: qcom-hw: enable boost support
@ 2021-01-13  6:52 Shawn Guo
  2021-01-14 15:33 ` Steev Klimaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Shawn Guo @ 2021-01-13  6:52 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar
  Cc: Bjorn Andersson, Andy Gross, Steev Klimaszewski, linux-pm,
	linux-arm-msm, Shawn Guo

At least on sdm850, the 2956800 khz is detected as a boost frequency in
function qcom_cpufreq_hw_read_lut().  Let's enable boost support by
calling cpufreq_enable_boost_support(), so that we can get the boost
frequency by switching it on via 'boost' sysfs entry like below.

 $ echo 1 > /sys/devices/system/cpu/cpufreq/boost

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/cpufreq/qcom-cpufreq-hw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 315ee987d2d3..6eb88463a24e 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -351,6 +351,12 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
 
 	dev_pm_opp_of_register_em(cpu_dev, policy->cpus);
 
+	if (policy_has_boost_freq(policy)) {
+		ret = cpufreq_enable_boost_support();
+		if (ret)
+			dev_warn(cpu_dev, "failed to enable boost: %d\n", ret);
+	}
+
 	return 0;
 error:
 	devm_iounmap(dev, base);
-- 
2.17.1


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

end of thread, other threads:[~2021-03-02  8:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13  6:52 [PATCH] cpufreq: qcom-hw: enable boost support Shawn Guo
2021-01-14 15:33 ` Steev Klimaszewski
2021-01-14 16:18 ` Bjorn Andersson
2021-01-18  6:44 ` Viresh Kumar
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
2021-03-02  2:04   ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox