cpufreq: vexpress-spc: use macros instead of hardcoded values for cluster ids
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 23 Oct 2019 11:08:10 +0000 (12:08 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 24 Oct 2019 03:07:17 +0000 (08:37 +0530)
A15 and A7 cluster identifiers are fixed to 0 and 1 respectively. There are
macros for the same and used in most of the places except this instance.

Lets use macros instead of hardcoded values for cluster ids even here.

Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/vexpress-spc-cpufreq.c

index 3259498d7eaa9e39c13be48b8b72d1a947e483c8..093ef8d3a8d408d7a9d4af7d2828e7b125b701b1 100644 (file)
@@ -380,8 +380,9 @@ static int get_cluster_clk_and_freq_table(struct device *cpu_dev,
                goto put_clusters;
 
        /* Assuming 2 cluster, set clk_big_min and clk_little_max */
-       clk_big_min = get_table_min(freq_table[0]);
-       clk_little_max = VIRT_FREQ(1, get_table_max(freq_table[1]));
+       clk_big_min = get_table_min(freq_table[A15_CLUSTER]);
+       clk_little_max = VIRT_FREQ(A7_CLUSTER,
+                                  get_table_max(freq_table[A7_CLUSTER]));
 
        return 0;