提交 6283e328 编写于 作者: L Linus Walleij 提交者: Dave Jones

[CPUFREQ] db8500: support all frequencies

This adds support for the 200 MHz frequency mode of the
DB8500 SoC, and prints the available frequencies at init
time.

Cc: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NDave Jones <davej@redhat.com>
上级 ded84337
...@@ -18,24 +18,29 @@ ...@@ -18,24 +18,29 @@
static struct cpufreq_frequency_table freq_table[] = { static struct cpufreq_frequency_table freq_table[] = {
[0] = { [0] = {
.index = 0, .index = 0,
.frequency = 300000, .frequency = 200000,
}, },
[1] = { [1] = {
.index = 1, .index = 1,
.frequency = 600000, .frequency = 300000,
}, },
[2] = { [2] = {
/* Used for MAX_OPP, if available */
.index = 2, .index = 2,
.frequency = CPUFREQ_TABLE_END, .frequency = 600000,
}, },
[3] = { [3] = {
/* Used for MAX_OPP, if available */
.index = 3, .index = 3,
.frequency = CPUFREQ_TABLE_END, .frequency = CPUFREQ_TABLE_END,
}, },
[4] = {
.index = 4,
.frequency = CPUFREQ_TABLE_END,
},
}; };
static enum arm_opp idx2opp[] = { static enum arm_opp idx2opp[] = {
ARM_EXTCLK,
ARM_50_OPP, ARM_50_OPP,
ARM_100_OPP, ARM_100_OPP,
ARM_MAX_OPP ARM_MAX_OPP
...@@ -108,12 +113,15 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) ...@@ -108,12 +113,15 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table)); BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table));
if (cpu_is_u8500v2() && !prcmu_is_u8400()) { if (!prcmu_is_u8400()) {
freq_table[0].frequency = 400000; freq_table[1].frequency = 400000;
freq_table[1].frequency = 800000; freq_table[2].frequency = 800000;
if (prcmu_has_arm_maxopp()) if (prcmu_has_arm_maxopp())
freq_table[2].frequency = 1000000; freq_table[3].frequency = 1000000;
} }
pr_info("db8500-cpufreq : Available frequencies:\n");
while (freq_table[i].frequency != CPUFREQ_TABLE_END)
pr_info(" %d Mhz\n", freq_table[i++].frequency/1000);
/* get policy fields based on the table */ /* get policy fields based on the table */
res = cpufreq_frequency_table_cpuinfo(policy, freq_table); res = cpufreq_frequency_table_cpuinfo(policy, freq_table);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册