提交 1a565cf0 编写于 作者: P Paul Mundt

sh: cpufreq: notify about rate rounding fallback.

The general case for platforms that support the clock framework fully
will be rate table rounding, while others will have to fall back on much
coarser general rate rounding. Notify about it during boot so the limited
functionality for the given subtype is appropriately noted.
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 1bcfc723
...@@ -127,13 +127,19 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) ...@@ -127,13 +127,19 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
if (freq_table) { if (freq_table) {
int result = cpufreq_frequency_table_cpuinfo(policy, freq_table); int result;
result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
if (!result) if (!result)
cpufreq_frequency_table_get_attr(freq_table, cpu); cpufreq_frequency_table_get_attr(freq_table, cpu);
} else { } else {
policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000; dev_notice(dev, "no frequency table found, falling back "
policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; "to rate rounding.\n");
policy->cpuinfo.min_freq =
(clk_round_rate(cpuclk, 1) + 500) / 1000;
policy->cpuinfo.max_freq =
(clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
} }
policy->min = policy->cpuinfo.min_freq; policy->min = policy->cpuinfo.min_freq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册