diff options
Diffstat (limited to 'arch/arm/mach-integrator/cpu.c')
-rw-r--r-- | arch/arm/mach-integrator/cpu.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c index 1671b4a363b1..3ebb785f30c1 100644 --- a/arch/arm/mach-integrator/cpu.c +++ b/arch/arm/mach-integrator/cpu.c | |||
@@ -32,7 +32,7 @@ static struct cpufreq_driver integrator_driver; | |||
32 | #define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) | 32 | #define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) |
33 | 33 | ||
34 | static const struct icst_params lclk_params = { | 34 | static const struct icst_params lclk_params = { |
35 | .ref = 24000, | 35 | .ref = 24000000, |
36 | .vco_max = ICST525_VCO_MAX_5V, | 36 | .vco_max = ICST525_VCO_MAX_5V, |
37 | .vd_min = 8, | 37 | .vd_min = 8, |
38 | .vd_max = 132, | 38 | .vd_max = 132, |
@@ -41,7 +41,7 @@ static const struct icst_params lclk_params = { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | static const struct icst_params cclk_params = { | 43 | static const struct icst_params cclk_params = { |
44 | .ref = 24000, | 44 | .ref = 24000000, |
45 | .vco_max = ICST525_VCO_MAX_5V, | 45 | .vco_max = ICST525_VCO_MAX_5V, |
46 | .vd_min = 12, | 46 | .vd_min = 12, |
47 | .vd_max = 160, | 47 | .vd_max = 160, |
@@ -60,11 +60,11 @@ static int integrator_verify_policy(struct cpufreq_policy *policy) | |||
60 | policy->cpuinfo.min_freq, | 60 | policy->cpuinfo.min_freq, |
61 | policy->cpuinfo.max_freq); | 61 | policy->cpuinfo.max_freq); |
62 | 62 | ||
63 | vco = icst525_khz_to_vco(&cclk_params, policy->max); | 63 | vco = icst525_hz_to_vco(&cclk_params, policy->max * 1000); |
64 | policy->max = icst525_khz(&cclk_params, vco); | 64 | policy->max = icst525_hz(&cclk_params, vco) / 1000; |
65 | 65 | ||
66 | vco = icst525_khz_to_vco(&cclk_params, policy->min); | 66 | vco = icst525_hz_to_vco(&cclk_params, policy->min * 1000); |
67 | policy->min = icst525_khz(&cclk_params, vco); | 67 | policy->min = icst525_hz(&cclk_params, vco) / 1000; |
68 | 68 | ||
69 | cpufreq_verify_within_limits(policy, | 69 | cpufreq_verify_within_limits(policy, |
70 | policy->cpuinfo.min_freq, | 70 | policy->cpuinfo.min_freq, |
@@ -106,17 +106,17 @@ static int integrator_set_target(struct cpufreq_policy *policy, | |||
106 | } | 106 | } |
107 | vco.v = cm_osc & 255; | 107 | vco.v = cm_osc & 255; |
108 | vco.r = 22; | 108 | vco.r = 22; |
109 | freqs.old = icst525_khz(&cclk_params, vco); | 109 | freqs.old = icst525_hz(&cclk_params, vco) / 1000; |
110 | 110 | ||
111 | /* icst525_khz_to_vco rounds down -- so we need the next | 111 | /* icst525_hz_to_vco rounds down -- so we need the next |
112 | * larger freq in case of CPUFREQ_RELATION_L. | 112 | * larger freq in case of CPUFREQ_RELATION_L. |
113 | */ | 113 | */ |
114 | if (relation == CPUFREQ_RELATION_L) | 114 | if (relation == CPUFREQ_RELATION_L) |
115 | target_freq += 999; | 115 | target_freq += 999; |
116 | if (target_freq > policy->max) | 116 | if (target_freq > policy->max) |
117 | target_freq = policy->max; | 117 | target_freq = policy->max; |
118 | vco = icst525_khz_to_vco(&cclk_params, target_freq); | 118 | vco = icst525_hz_to_vco(&cclk_params, target_freq * 1000); |
119 | freqs.new = icst525_khz(&cclk_params, vco); | 119 | freqs.new = icst525_hz(&cclk_params, vco) / 1000; |
120 | 120 | ||
121 | freqs.cpu = policy->cpu; | 121 | freqs.cpu = policy->cpu; |
122 | 122 | ||
@@ -174,7 +174,7 @@ static unsigned int integrator_get(unsigned int cpu) | |||
174 | vco.v = cm_osc & 255; | 174 | vco.v = cm_osc & 255; |
175 | vco.r = 22; | 175 | vco.r = 22; |
176 | 176 | ||
177 | current_freq = icst525_khz(&cclk_params, vco); /* current freq */ | 177 | current_freq = icst525_hz(&cclk_params, vco) / 1000; /* current freq */ |
178 | 178 | ||
179 | set_cpus_allowed(current, cpus_allowed); | 179 | set_cpus_allowed(current, cpus_allowed); |
180 | 180 | ||