aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpufreq.c')
-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)
127 127
128 freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; 128 freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
129 if (freq_table) { 129 if (freq_table) {
130 int result = cpufreq_frequency_table_cpuinfo(policy, freq_table); 130 int result;
131 131
132 result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
132 if (!result) 133 if (!result)
133 cpufreq_frequency_table_get_attr(freq_table, cpu); 134 cpufreq_frequency_table_get_attr(freq_table, cpu);
134 } else { 135 } else {
135 policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000; 136 dev_notice(dev, "no frequency table found, falling back "
136 policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; 137 "to rate rounding.\n");
138
139 policy->cpuinfo.min_freq =
140 (clk_round_rate(cpuclk, 1) + 500) / 1000;
141 policy->cpuinfo.max_freq =
142 (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
137 } 143 }
138 144
139 policy->min = policy->cpuinfo.min_freq; 145 policy->min = policy->cpuinfo.min_freq;