From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>, Sekhar Nori <nsekhar@ti.com>,
Kevin Hilman <khilman@kernel.org>
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 1/8] ARM: davinci: Sort frequency table
Date: Fri, 3 Jun 2016 10:58:45 +0530 [thread overview]
Message-ID: <f9a03695c321b9c0628c6ae0136adfe004f358ad.1464931080.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1464931080.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1464931080.git.viresh.kumar@linaro.org>
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
next prev parent reply other threads:[~2016-06-03 5:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 5:28 [PATCH V3 0/8] cpufreq: cleanups and reorganization Viresh Kumar
2016-06-03 5:28 ` Viresh Kumar [this message]
2016-06-06 3:44 ` [PATCH V4 1/8] ARM: davinci: Sort frequency table Viresh Kumar
2016-06-07 10:27 ` Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 2/8] cpufreq: s3c24xx: Remove useless checks Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 3/8] cpufreq: Remove cpufreq_frequency_get_table() Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 4/8] cpufreq: ondemand: Don't keep a copy of freq_table pointer Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 5/8] cpufreq: Drop freq-table param to cpufreq_frequency_table_target() Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 6/8] cpufreq: Drop 'freq_table' argument of __target_index() Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 7/8] cpufreq: Return index from cpufreq_frequency_table_target() Viresh Kumar
2016-06-03 5:28 ` [PATCH V3 8/8] cpufreq: davinci: Reuse cpufreq_generic_frequency_table_verify() Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9a03695c321b9c0628c6ae0136adfe004f358ad.1464931080.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=khilman@kernel.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).