Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1412276

[PATCH 01/11] ARM: davinci: Sort frequency table

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 01/11] ARM: davinci: Sort frequency table
Date 2016-06-02 16:30 +0200
Message-ID <rFBNf-71V-3@gated-at.bofh.it> (permalink)
References <rFBDz-6Xf-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This is required for some of the changes in cpufreq core. There was only
one function dependent on the order of the table, that is fixed as well.

Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-davinci/da850.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 239886299968..f683c119cfed 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1004,13 +1004,14 @@ static const struct da850_opp da850_opp_96 = {
 		.frequency = freq * 1000, \
 	}
 
+/* Table sorted in ascending order of frequencies */
 static struct cpufreq_frequency_table da850_freq_table[] = {
-	OPP(456),
-	OPP(408),
-	OPP(372),
-	OPP(300),
-	OPP(200),
 	OPP(96),
+	OPP(200),
+	OPP(300),
+	OPP(372),
+	OPP(408),
+	OPP(456),
 	{
 		.driver_data		= 0,
 		.frequency	= CPUFREQ_TABLE_END,
@@ -1076,8 +1077,9 @@ int da850_register_cpufreq(char *async_clk)
 		clk_add_alias("async", da850_cpufreq_device.name,
 							async_clk, NULL);
 	for (i = 0; i < ARRAY_SIZE(da850_freq_table); i++) {
-		if (da850_freq_table[i].frequency <= da850_max_speed) {
-			cpufreq_info.freq_table = &da850_freq_table[i];
+		if (da850_freq_table[i].frequency > da850_max_speed) {
+			&da850_freq_table[i].driver_data = 0;
+			&da850_freq_table[i].frequency = CPUFREQ_TABLE_END;
 			break;
 		}
 	}
-- 
2.7.1.410.g6faf27b

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/11] cpufreq: Keep policy->freq_table sorted Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:20 +0200
  [PATCH 04/11] cpufreq: blackfin: Use 'index' only to index into policy->freq_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:20 +0200
  [PATCH 01/11] ARM: davinci: Sort frequency table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 05/11] cpufreq: elanfreq: Use 'index' only to index into policy->freq_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 10/11] cpufreq: Keep a single (sorted) freq_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 02/11] cpufreq: davinci: Reuse cpufreq_generic_frequency_table_verify() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 11/11] cpufreq: drivers: Free frequency tables after being used Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 08/11] cpufreq: imx: Use 'index' only to index into policy->freq_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 03/11] cpufreq: Use policy->freq_table in ->target_index() Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  [PATCH 09/11] cpufreq: maple: Use 'index' only to index into policy->freq_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 16:30 +0200
  Re: [PATCH 00/11] cpufreq: Keep policy->freq_table sorted "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-02 17:10 +0200
    Re: [PATCH 00/11] cpufreq: Keep policy->freq_table sorted Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-02 18:00 +0200
      Re: [PATCH 00/11] cpufreq: Keep policy->freq_table sorted "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-02 22:40 +0200
        Re: [PATCH 00/11] cpufreq: Keep policy->freq_table sorted Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-03 02:10 +0200
          Re: [PATCH 00/11] cpufreq: Keep policy->freq_table sorted "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-03 03:40 +0200
            Re: [PATCH 00/11] cpufreq: Keep policy->freq_table sorted Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-03 05:20 +0200

csiph-web