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/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch | 48 |
1 files changed, 48 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/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch new file mode 100644 index 00000000..dd23c082 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From f231980dbd0f05229f2020e59b7242872576416f Mon Sep 17 00:00:00 2001 | ||
2 | From: Nishanth Menon <nm@ti.com> | ||
3 | Date: Fri, 13 May 2011 05:34:35 -0700 | ||
4 | Subject: [PATCH 4/6] OMAP2: cpufreq: use clk_init_cpufreq_table if OPPs not available | ||
5 | |||
6 | OMAP2 does not use OPP tables at the moment for DVFS. Currently, | ||
7 | we depend on opp table initialization to give us the freq_table, | ||
8 | which makes sense for OMAP3+. for OMAP2, we should be using | ||
9 | clk_init_cpufreq_table - so if the opp based frequency table | ||
10 | initilization fails, fall back to clk_init_cpufreq_table to give | ||
11 | us the table. | ||
12 | |||
13 | Signed-off-by: Nishanth Menon <nm@ti.com> | ||
14 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
15 | --- | ||
16 | arch/arm/mach-omap2/omap2plus-cpufreq.c | 9 ++++++++- | ||
17 | 1 files changed, 8 insertions(+), 1 deletions(-) | ||
18 | |||
19 | diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c | ||
20 | index 45f1e9e..854f4b3 100644 | ||
21 | --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c | ||
22 | +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c | ||
23 | @@ -180,7 +180,13 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) | ||
24 | pr_warning("%s: unable to get the mpu device\n", __func__); | ||
25 | return -EINVAL; | ||
26 | } | ||
27 | - opp_init_cpufreq_table(mpu_dev, &freq_table); | ||
28 | + | ||
29 | + /* | ||
30 | + * if we dont get cpufreq table using opp, use traditional omap2 lookup | ||
31 | + * as a fallback | ||
32 | + */ | ||
33 | + if (opp_init_cpufreq_table(mpu_dev, &freq_table)) | ||
34 | + clk_init_cpufreq_table(&freq_table); | ||
35 | |||
36 | if (freq_table) { | ||
37 | result = cpufreq_frequency_table_cpuinfo(policy, freq_table); | ||
38 | @@ -188,6 +194,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) | ||
39 | cpufreq_frequency_table_get_attr(freq_table, | ||
40 | policy->cpu); | ||
41 | } else { | ||
42 | + clk_exit_cpufreq_table(&freq_table); | ||
43 | WARN(true, "%s: fallback to clk_round(freq_table=%d)\n", | ||
44 | __func__, result); | ||
45 | kfree(freq_table); | ||
46 | -- | ||
47 | 1.6.6.1 | ||
48 | |||