aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-16 15:16:10 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 04:35:33 -0400
commitc5a0adb51002e51a4254cb7f0ab7190d41d8b930 (patch)
treeb6ae6bd13b1aa722e7d96876da28cd5ac3722188 /arch/arm/mach-integrator
parent232eaf7f268f765b52170bec42bfa0c5825aa239 (diff)
ARM: ICST: kill duplicate icst code
The only difference between ICST307 and ICST525 are the two arrays for calculating the S parameter; the code is now identical. Merge the two files and kill the duplicated code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/clock.c10
-rw-r--r--arch/arm/mach-integrator/cpu.c20
-rw-r--r--arch/arm/mach-integrator/impd1.c2
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c2
4 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c
index a4f80d33429d..52fc294eac74 100644
--- a/arch/arm/mach-integrator/clock.c
+++ b/arch/arm/mach-integrator/clock.c
@@ -14,7 +14,7 @@
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16 16
17#include <asm/hardware/icst525.h> 17#include <asm/hardware/icst.h>
18#include <asm/clkdev.h> 18#include <asm/clkdev.h>
19#include <mach/clkdev.h> 19#include <mach/clkdev.h>
20 20
@@ -38,8 +38,8 @@ EXPORT_SYMBOL(clk_get_rate);
38long clk_round_rate(struct clk *clk, unsigned long rate) 38long clk_round_rate(struct clk *clk, unsigned long rate)
39{ 39{
40 struct icst_vco vco; 40 struct icst_vco vco;
41 vco = icst525_hz_to_vco(clk->params, rate); 41 vco = icst_hz_to_vco(clk->params, rate);
42 return icst525_hz(clk->params, vco); 42 return icst_hz(clk->params, vco);
43} 43}
44EXPORT_SYMBOL(clk_round_rate); 44EXPORT_SYMBOL(clk_round_rate);
45 45
@@ -50,8 +50,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
50 if (clk->setvco) { 50 if (clk->setvco) {
51 struct icst_vco vco; 51 struct icst_vco vco;
52 52
53 vco = icst525_hz_to_vco(clk->params, rate); 53 vco = icst_hz_to_vco(clk->params, rate);
54 clk->rate = icst525_hz(clk->params, vco); 54 clk->rate = icst_hz(clk->params, vco);
55 clk->setvco(clk, vco); 55 clk->setvco(clk, vco);
56 ret = 0; 56 ret = 0;
57 } 57 }
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
index 9481c5408bf8..1cb222daa06d 100644
--- a/arch/arm/mach-integrator/cpu.c
+++ b/arch/arm/mach-integrator/cpu.c
@@ -22,7 +22,7 @@
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <mach/platform.h> 23#include <mach/platform.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/hardware/icst525.h> 25#include <asm/hardware/icst.h>
26 26
27static struct cpufreq_driver integrator_driver; 27static struct cpufreq_driver integrator_driver;
28 28
@@ -66,11 +66,11 @@ static int integrator_verify_policy(struct cpufreq_policy *policy)
66 policy->cpuinfo.min_freq, 66 policy->cpuinfo.min_freq,
67 policy->cpuinfo.max_freq); 67 policy->cpuinfo.max_freq);
68 68
69 vco = icst525_hz_to_vco(&cclk_params, policy->max * 1000); 69 vco = icst_hz_to_vco(&cclk_params, policy->max * 1000);
70 policy->max = icst525_hz(&cclk_params, vco) / 1000; 70 policy->max = icst_hz(&cclk_params, vco) / 1000;
71 71
72 vco = icst525_hz_to_vco(&cclk_params, policy->min * 1000); 72 vco = icst_hz_to_vco(&cclk_params, policy->min * 1000);
73 policy->min = icst525_hz(&cclk_params, vco) / 1000; 73 policy->min = icst_hz(&cclk_params, vco) / 1000;
74 74
75 cpufreq_verify_within_limits(policy, 75 cpufreq_verify_within_limits(policy,
76 policy->cpuinfo.min_freq, 76 policy->cpuinfo.min_freq,
@@ -112,17 +112,17 @@ static int integrator_set_target(struct cpufreq_policy *policy,
112 } 112 }
113 vco.v = cm_osc & 255; 113 vco.v = cm_osc & 255;
114 vco.r = 22; 114 vco.r = 22;
115 freqs.old = icst525_hz(&cclk_params, vco) / 1000; 115 freqs.old = icst_hz(&cclk_params, vco) / 1000;
116 116
117 /* icst525_hz_to_vco rounds down -- so we need the next 117 /* icst_hz_to_vco rounds down -- so we need the next
118 * larger freq in case of CPUFREQ_RELATION_L. 118 * larger freq in case of CPUFREQ_RELATION_L.
119 */ 119 */
120 if (relation == CPUFREQ_RELATION_L) 120 if (relation == CPUFREQ_RELATION_L)
121 target_freq += 999; 121 target_freq += 999;
122 if (target_freq > policy->max) 122 if (target_freq > policy->max)
123 target_freq = policy->max; 123 target_freq = policy->max;
124 vco = icst525_hz_to_vco(&cclk_params, target_freq * 1000); 124 vco = icst_hz_to_vco(&cclk_params, target_freq * 1000);
125 freqs.new = icst525_hz(&cclk_params, vco) / 1000; 125 freqs.new = icst_hz(&cclk_params, vco) / 1000;
126 126
127 freqs.cpu = policy->cpu; 127 freqs.cpu = policy->cpu;
128 128
@@ -180,7 +180,7 @@ static unsigned int integrator_get(unsigned int cpu)
180 vco.v = cm_osc & 255; 180 vco.v = cm_osc & 255;
181 vco.r = 22; 181 vco.r = 22;
182 182
183 current_freq = icst525_hz(&cclk_params, vco) / 1000; /* current freq */ 183 current_freq = icst_hz(&cclk_params, vco) / 1000; /* current freq */
184 184
185 set_cpus_allowed(current, cpus_allowed); 185 set_cpus_allowed(current, cpus_allowed);
186 186
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index e24cfc357ffb..3e2110216851 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -24,7 +24,7 @@
24 24
25#include <asm/clkdev.h> 25#include <asm/clkdev.h>
26#include <mach/clkdev.h> 26#include <mach/clkdev.h>
27#include <asm/hardware/icst525.h> 27#include <asm/hardware/icst.h>
28#include <mach/lm.h> 28#include <mach/lm.h>
29#include <mach/impd1.h> 29#include <mach/impd1.h>
30#include <asm/sizes.h> 30#include <asm/sizes.h>
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 9997d1f6c184..a9ab8fda3992 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -29,7 +29,7 @@
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/hardware/icst525.h> 32#include <asm/hardware/icst.h>
33 33
34#include <mach/cm.h> 34#include <mach/cm.h>
35#include <mach/lm.h> 35#include <mach/lm.h>