Thread (5 messages) 5 messages, 2 authors, 2021-06-29

Re: [PATCH v12 1/2] cpufreq: mediatek-hw: Add support for CPUFREQ HW

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-06-28 07:26:48
Also in: linux-devicetree, linux-mediatek, linux-pm, lkml

Possibly related (same subject, not in this thread)

On 27-06-21, 16:17, Hector Yuan wrote:
On Mon, 2021-06-14 at 16:10 +0530, Viresh Kumar wrote:
quoted
On 30-05-21, 00:52, Hector Yuan wrote:
quoted
+static int mtk_get_related_cpus(int index, struct cpufreq_mtk *c)
+{
+	struct device_node *cpu_np;
+	struct of_phandle_args args;
+	int cpu, ret;
+
+	for_each_possible_cpu(cpu) {
+		cpu_np = of_cpu_device_node_get(cpu);
+		if (!cpu_np)
+			continue;
+
+		ret = of_parse_phandle_with_args(cpu_np, "performance-domains",
+						 "#performance-domain-cells", 0,
+						 &args);
+		of_node_put(cpu_np);
+		if (ret < 0)
+			continue;
+
+		if (index == args.args[0]) {
+			cpumask_set_cpu(cpu, &c->related_cpus);
+			mtk_freq_domain_map[cpu] = c;
+		}
+	}
+
+	return 0;
+}
I really hope this can be moved to a common place as more than one
drier should be required to parse this thing.
Yes, this can be a common part for all performance domain users. But may
I know whats your suggestion? Put this API in another file or? Thanks
Rob, Sudeep: You guys have a suggestion on where can we keep a routine for this
?

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help