diff options
Diffstat (limited to 'drivers/cpufreq/ppc-corenet-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/ppc-corenet-cpufreq.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index 0af618abebaf..3607070797af 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c | |||
@@ -138,7 +138,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
138 | struct cpufreq_frequency_table *table; | 138 | struct cpufreq_frequency_table *table; |
139 | struct cpu_data *data; | 139 | struct cpu_data *data; |
140 | unsigned int cpu = policy->cpu; | 140 | unsigned int cpu = policy->cpu; |
141 | u64 transition_latency_hz; | 141 | u64 u64temp; |
142 | 142 | ||
143 | np = of_get_cpu_node(cpu, NULL); | 143 | np = of_get_cpu_node(cpu, NULL); |
144 | if (!np) | 144 | if (!np) |
@@ -206,9 +206,10 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
206 | for_each_cpu(i, per_cpu(cpu_mask, cpu)) | 206 | for_each_cpu(i, per_cpu(cpu_mask, cpu)) |
207 | per_cpu(cpu_data, i) = data; | 207 | per_cpu(cpu_data, i) = data; |
208 | 208 | ||
209 | transition_latency_hz = 12ULL * NSEC_PER_SEC; | 209 | /* Minimum transition latency is 12 platform clocks */ |
210 | policy->cpuinfo.transition_latency = | 210 | u64temp = 12ULL * NSEC_PER_SEC; |
211 | do_div(transition_latency_hz, fsl_get_sys_freq()); | 211 | do_div(u64temp, fsl_get_sys_freq()); |
212 | policy->cpuinfo.transition_latency = u64temp + 1; | ||
212 | 213 | ||
213 | of_node_put(np); | 214 | of_node_put(np); |
214 | 215 | ||