Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 496c1f99 authored by Taniya Das's avatar Taniya Das
Browse files

cpufreq: qcom: Add support for multiple boost frequencies



In case there are multiple boost frequencies, mark them as BOOST. Also
fix the issue in adding the boost frequencies to the OPP table.

Change-Id: I877eee803ea0f63592aa0fa8e8d4722690e8f4cd
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent dc0641f6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -413,8 +413,10 @@ static int qcom_cpufreq_hw_read_lut(struct platform_device *pdev,
		dev_dbg(dev, "index=%d freq=%d, core_count %d\n",
			i, c->table[i].frequency, core_count);

		if (core_count != c->max_cores)
		if (core_count != c->max_cores) {
			cur_freq = CPUFREQ_ENTRY_INVALID;
			c->table[i].flags = CPUFREQ_BOOST_FREQ;
		}

		/*
		 * Two of the same frequencies with the same core counts means
@@ -431,12 +433,12 @@ static int qcom_cpufreq_hw_read_lut(struct platform_device *pdev,
		prev_cc = core_count;
		prev_freq = cur_freq;

		cur_freq *= 1000;
		for_each_cpu(cpu, &c->related_cpus) {
			cpu_dev = get_cpu_device(cpu);
			if (!cpu_dev)
				continue;
			dev_pm_opp_add(cpu_dev, cur_freq, volt);
			dev_pm_opp_add(cpu_dev, c->table[i].frequency * 1000,
							volt);
		}
	}