summaryrefslogtreecommitdiff
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-01-27 20:43:14 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-01-27 20:43:14 +0900
commit1a565cf07fa1be0a6d5cf30e87ee2d204e9753d3 (patch)
tree770c78fed14a86682d251fd91fb2381d317b4876 /arch/sh/kernel
parent1bcfc723c8688a257df920999a43bcc2e59d5908 (diff)
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: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/cpufreq.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c
index e0accdc5438a..7bacbed0299a 100644
--- a/arch/sh/kernel/cpufreq.c
+++ b/arch/sh/kernel/cpufreq.c
@@ -127,13 +127,19 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
if (freq_table) {
- int result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+ int result;
+ result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
if (!result)
cpufreq_frequency_table_get_attr(freq_table, cpu);
} else {
- policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
- policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
+ dev_notice(dev, "no frequency table found, falling back "
+ "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;