aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/cpufreq.c')
-rw-r--r--arch/arm/mach-davinci/cpufreq.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
index 8fb0c2ac227e..7c2e943c5500 100644
--- a/arch/arm/mach-davinci/cpufreq.c
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -137,21 +137,16 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
137 return result; 137 return result;
138 } 138 }
139 139
140 policy->cur = policy->min = policy->max = davinci_getspeed(0); 140 policy->cur = davinci_getspeed(0);
141 141
142 if (freq_table) { 142 result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
143 result = cpufreq_frequency_table_cpuinfo(policy, freq_table); 143 if (result) {
144 if (!result) 144 pr_err("%s: cpufreq_frequency_table_cpuinfo() failed",
145 cpufreq_frequency_table_get_attr(freq_table, 145 __func__);
146 policy->cpu); 146 return result;
147 } else {
148 policy->cpuinfo.min_freq = policy->min;
149 policy->cpuinfo.max_freq = policy->max;
150 } 147 }
151 148
152 policy->min = policy->cpuinfo.min_freq; 149 cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
153 policy->max = policy->cpuinfo.max_freq;
154 policy->cur = davinci_getspeed(0);
155 150
156 /* 151 /*
157 * Time measurement across the target() function yields ~1500-1800us 152 * Time measurement across the target() function yields ~1500-1800us