diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-16 11:27:28 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:29 -0400 |
commit | 39c0cb02db5b8fdfac76d506b7a008b70bc960e9 (patch) | |
tree | 30e79dcadb5f6c26bba5fcf585cc309e240ff948 /arch/arm/mach-integrator | |
parent | b830b9b5b3d04bc22f0b9ded85b713f7d3c11b7f (diff) |
ARM: ICST: merge common ICST VCO structures
The structures for the ICST307 and ICST525 VCO devices are
identical, so merge them together.
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.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-integrator/cpu.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-integrator/impd1.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-integrator/include/mach/clkdev.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 4 |
5 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c index 989ecf5f5c46..bb70b64a6563 100644 --- a/arch/arm/mach-integrator/clock.c +++ b/arch/arm/mach-integrator/clock.c | |||
@@ -14,6 +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/clkdev.h> | 18 | #include <asm/clkdev.h> |
18 | #include <mach/clkdev.h> | 19 | #include <mach/clkdev.h> |
19 | 20 | ||
@@ -36,7 +37,7 @@ EXPORT_SYMBOL(clk_get_rate); | |||
36 | 37 | ||
37 | long clk_round_rate(struct clk *clk, unsigned long rate) | 38 | long clk_round_rate(struct clk *clk, unsigned long rate) |
38 | { | 39 | { |
39 | struct icst525_vco vco; | 40 | struct icst_vco vco; |
40 | vco = icst525_khz_to_vco(clk->params, rate / 1000); | 41 | vco = icst525_khz_to_vco(clk->params, rate / 1000); |
41 | return icst525_khz(clk->params, vco) * 1000; | 42 | return icst525_khz(clk->params, vco) * 1000; |
42 | } | 43 | } |
@@ -47,7 +48,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
47 | int ret = -EIO; | 48 | int ret = -EIO; |
48 | 49 | ||
49 | if (clk->setvco) { | 50 | if (clk->setvco) { |
50 | struct icst525_vco vco; | 51 | struct icst_vco vco; |
51 | 52 | ||
52 | vco = icst525_khz_to_vco(clk->params, rate / 1000); | 53 | vco = icst525_khz_to_vco(clk->params, rate / 1000); |
53 | clk->rate = icst525_khz(clk->params, vco) * 1000; | 54 | clk->rate = icst525_khz(clk->params, vco) * 1000; |
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c index 7f1b73b776a7..c4e5debeb48c 100644 --- a/arch/arm/mach-integrator/cpu.c +++ b/arch/arm/mach-integrator/cpu.c | |||
@@ -31,7 +31,7 @@ static struct cpufreq_driver integrator_driver; | |||
31 | #define CM_STAT IO_ADDRESS(INTEGRATOR_HDR_STAT) | 31 | #define CM_STAT IO_ADDRESS(INTEGRATOR_HDR_STAT) |
32 | #define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) | 32 | #define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) |
33 | 33 | ||
34 | static const struct icst525_params lclk_params = { | 34 | static const struct icst_params lclk_params = { |
35 | .ref = 24000, | 35 | .ref = 24000, |
36 | .vco_max = 320000, | 36 | .vco_max = 320000, |
37 | .vd_min = 8, | 37 | .vd_min = 8, |
@@ -40,7 +40,7 @@ static const struct icst525_params lclk_params = { | |||
40 | .rd_max = 24, | 40 | .rd_max = 24, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static const struct icst525_params cclk_params = { | 43 | static const struct icst_params cclk_params = { |
44 | .ref = 24000, | 44 | .ref = 24000, |
45 | .vco_max = 320000, | 45 | .vco_max = 320000, |
46 | .vd_min = 12, | 46 | .vd_min = 12, |
@@ -54,7 +54,7 @@ static const struct icst525_params cclk_params = { | |||
54 | */ | 54 | */ |
55 | static int integrator_verify_policy(struct cpufreq_policy *policy) | 55 | static int integrator_verify_policy(struct cpufreq_policy *policy) |
56 | { | 56 | { |
57 | struct icst525_vco vco; | 57 | struct icst_vco vco; |
58 | 58 | ||
59 | cpufreq_verify_within_limits(policy, | 59 | cpufreq_verify_within_limits(policy, |
60 | policy->cpuinfo.min_freq, | 60 | policy->cpuinfo.min_freq, |
@@ -80,7 +80,7 @@ static int integrator_set_target(struct cpufreq_policy *policy, | |||
80 | { | 80 | { |
81 | cpumask_t cpus_allowed; | 81 | cpumask_t cpus_allowed; |
82 | int cpu = policy->cpu; | 82 | int cpu = policy->cpu; |
83 | struct icst525_vco vco; | 83 | struct icst_vco vco; |
84 | struct cpufreq_freqs freqs; | 84 | struct cpufreq_freqs freqs; |
85 | u_int cm_osc; | 85 | u_int cm_osc; |
86 | 86 | ||
@@ -156,7 +156,7 @@ static unsigned int integrator_get(unsigned int cpu) | |||
156 | cpumask_t cpus_allowed; | 156 | cpumask_t cpus_allowed; |
157 | unsigned int current_freq; | 157 | unsigned int current_freq; |
158 | u_int cm_osc; | 158 | u_int cm_osc; |
159 | struct icst525_vco vco; | 159 | struct icst_vco vco; |
160 | 160 | ||
161 | cpus_allowed = current->cpus_allowed; | 161 | cpus_allowed = current->cpus_allowed; |
162 | 162 | ||
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 0058c937719e..dfb961b67afa 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -40,7 +40,7 @@ struct impd1_module { | |||
40 | struct clk_lookup *clks[3]; | 40 | struct clk_lookup *clks[3]; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static const struct icst525_params impd1_vco_params = { | 43 | static const struct icst_params impd1_vco_params = { |
44 | .ref = 24000, /* 24 MHz */ | 44 | .ref = 24000, /* 24 MHz */ |
45 | .vco_max = 200000, /* 200 MHz */ | 45 | .vco_max = 200000, /* 200 MHz */ |
46 | .vd_min = 12, | 46 | .vd_min = 12, |
@@ -49,7 +49,7 @@ static const struct icst525_params impd1_vco_params = { | |||
49 | .rd_max = 120, | 49 | .rd_max = 120, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static void impd1_setvco(struct clk *clk, struct icst525_vco vco) | 52 | static void impd1_setvco(struct clk *clk, struct icst_vco vco) |
53 | { | 53 | { |
54 | struct impd1_module *impd1 = clk->data; | 54 | struct impd1_module *impd1 = clk->data; |
55 | int vconr = clk - impd1->vcos; | 55 | int vconr = clk - impd1->vcos; |
diff --git a/arch/arm/mach-integrator/include/mach/clkdev.h b/arch/arm/mach-integrator/include/mach/clkdev.h index 9293e410832a..89ea93803998 100644 --- a/arch/arm/mach-integrator/include/mach/clkdev.h +++ b/arch/arm/mach-integrator/include/mach/clkdev.h | |||
@@ -2,14 +2,14 @@ | |||
2 | #define __ASM_MACH_CLKDEV_H | 2 | #define __ASM_MACH_CLKDEV_H |
3 | 3 | ||
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <asm/hardware/icst525.h> | 5 | #include <asm/hardware/icst.h> |
6 | 6 | ||
7 | struct clk { | 7 | struct clk { |
8 | unsigned long rate; | 8 | unsigned long rate; |
9 | struct module *owner; | 9 | struct module *owner; |
10 | const struct icst525_params *params; | 10 | const struct icst_params *params; |
11 | void *data; | 11 | void *data; |
12 | void (*setvco)(struct clk *, struct icst525_vco vco); | 12 | void (*setvco)(struct clk *, struct icst_vco vco); |
13 | }; | 13 | }; |
14 | 14 | ||
15 | static inline int __clk_get(struct clk *clk) | 15 | static inline int __clk_get(struct clk *clk) |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index c0161df9d9a2..15bfbe2e1df8 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -268,7 +268,7 @@ static void __init intcp_init_irq(void) | |||
268 | #define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) | 268 | #define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) |
269 | #define CM_AUXOSC IO_ADDRESS(INTEGRATOR_HDR_BASE + 0x1c) | 269 | #define CM_AUXOSC IO_ADDRESS(INTEGRATOR_HDR_BASE + 0x1c) |
270 | 270 | ||
271 | static const struct icst525_params cp_auxvco_params = { | 271 | static const struct icst_params cp_auxvco_params = { |
272 | .ref = 24000, | 272 | .ref = 24000, |
273 | .vco_max = 320000, | 273 | .vco_max = 320000, |
274 | .vd_min = 8, | 274 | .vd_min = 8, |
@@ -277,7 +277,7 @@ static const struct icst525_params cp_auxvco_params = { | |||
277 | .rd_max = 65, | 277 | .rd_max = 65, |
278 | }; | 278 | }; |
279 | 279 | ||
280 | static void cp_auxvco_set(struct clk *clk, struct icst525_vco vco) | 280 | static void cp_auxvco_set(struct clk *clk, struct icst_vco vco) |
281 | { | 281 | { |
282 | u32 val; | 282 | u32 val; |
283 | 283 | ||