Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1412817 > unrolled thread
| Started by | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| First post | 2016-06-03 07:40 +0200 |
| Last post | 2016-06-07 12:30 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V3 1/8] ARM: davinci: Sort frequency table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-03 07:40 +0200
[PATCH V4 1/8] ARM: davinci: Sort frequency table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-06 05:50 +0200
Re: [PATCH V4 1/8] ARM: davinci: Sort frequency table Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-07 12:30 +0200
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-06-03 07:40 +0200 |
| Subject | [PATCH V3 1/8] ARM: davinci: Sort frequency table |
| Message-ID | <rFPZT-7zc-7@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-06-06 05:50 +0200 |
| Subject | [PATCH V4 1/8] ARM: davinci: Sort frequency table |
| Message-ID | <rGTI5-7Qz-1@gated-at.bofh.it> |
| In reply to | #1412817 |
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>
---
V3->V4:
- Fixed an error reported by buildbot, by removing '&' before
usage of da850_freq_table.
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..a706df3367ee 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
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-06-07 12:30 +0200 |
| Subject | Re: [PATCH V4 1/8] ARM: davinci: Sort frequency table |
| Message-ID | <rHmqJ-1so-11@gated-at.bofh.it> |
| In reply to | #1414597 |
On 06-06-16, 09:14, Viresh Kumar wrote: > 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> > --- > V3->V4: > - Fixed an error reported by buildbot, by removing '&' before > usage of da850_freq_table. @Rafael, If you are going to apply the V4 of the other series that adds new helpers for sorted freq-tables, then this patch wouldn't be required anymore. The other 7 shall be applied though. -- viresh
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web