diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch new file mode 100644 index 00000000..087724d1 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 5febdc0482e545c2a598f035c5e03931e0c3c808 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nishanth Menon <nm@ti.com> | ||
3 | Date: Thu, 12 May 2011 08:14:41 -0500 | ||
4 | Subject: [PATCH 2/6] OMAP2+: cpufreq: handle invalid cpufreq table | ||
5 | |||
6 | Handle the case when cpufreq_frequency_table_cpuinfo fails. freq_table | ||
7 | that we passed failed the internal test of cpufreq generic driver, | ||
8 | so we should'nt be using the freq_table as such. Instead, warn and | ||
9 | fallback to clock functions for validation and operation. | ||
10 | |||
11 | Signed-off-by: Nishanth Menon <nm@ti.com> | ||
12 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
13 | --- | ||
14 | arch/arm/mach-omap2/omap2plus-cpufreq.c | 12 ++++++++++-- | ||
15 | 1 files changed, 10 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c | ||
18 | index e38ebb8..6e3666a 100644 | ||
19 | --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c | ||
20 | +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c | ||
21 | @@ -182,10 +182,18 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) | ||
22 | |||
23 | if (freq_table) { | ||
24 | result = cpufreq_frequency_table_cpuinfo(policy, freq_table); | ||
25 | - if (!result) | ||
26 | + if (!result) { | ||
27 | cpufreq_frequency_table_get_attr(freq_table, | ||
28 | policy->cpu); | ||
29 | - } else { | ||
30 | + } else { | ||
31 | + WARN(true, "%s: fallback to clk_round(freq_table=%d)\n", | ||
32 | + __func__, result); | ||
33 | + kfree(freq_table); | ||
34 | + freq_table = NULL; | ||
35 | + } | ||
36 | + } | ||
37 | + | ||
38 | + if (!freq_table) { | ||
39 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; | ||
40 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, | ||
41 | VERY_HI_RATE) / 1000; | ||
42 | -- | ||
43 | 1.6.6.1 | ||
44 | |||