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-versatile | |
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-versatile')
-rw-r--r-- | arch/arm/mach-versatile/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-versatile/clock.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-versatile/core.c | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c index c50a44ea7ee6..530e16aa7ad6 100644 --- a/arch/arm/mach-versatile/clock.c +++ b/arch/arm/mach-versatile/clock.c | |||
@@ -42,7 +42,7 @@ EXPORT_SYMBOL(clk_get_rate); | |||
42 | 42 | ||
43 | long clk_round_rate(struct clk *clk, unsigned long rate) | 43 | long clk_round_rate(struct clk *clk, unsigned long rate) |
44 | { | 44 | { |
45 | struct icst307_vco vco; | 45 | struct icst_vco vco; |
46 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | 46 | vco = icst307_khz_to_vco(clk->params, rate / 1000); |
47 | return icst307_khz(clk->params, vco) * 1000; | 47 | return icst307_khz(clk->params, vco) * 1000; |
48 | } | 48 | } |
@@ -53,7 +53,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
53 | int ret = -EIO; | 53 | int ret = -EIO; |
54 | 54 | ||
55 | if (clk->setvco) { | 55 | if (clk->setvco) { |
56 | struct icst307_vco vco; | 56 | struct icst_vco vco; |
57 | 57 | ||
58 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | 58 | vco = icst307_khz_to_vco(clk->params, rate / 1000); |
59 | clk->rate = icst307_khz(clk->params, vco) * 1000; | 59 | clk->rate = icst307_khz(clk->params, vco) * 1000; |
diff --git a/arch/arm/mach-versatile/clock.h b/arch/arm/mach-versatile/clock.h index 03468fdc3e58..aed7e22d102b 100644 --- a/arch/arm/mach-versatile/clock.h +++ b/arch/arm/mach-versatile/clock.h | |||
@@ -8,13 +8,14 @@ | |||
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <asm/hardware/icst.h> | ||
12 | |||
11 | struct module; | 13 | struct module; |
12 | struct icst307_params; | ||
13 | 14 | ||
14 | struct clk { | 15 | struct clk { |
15 | unsigned long rate; | 16 | unsigned long rate; |
16 | const struct icst307_params *params; | 17 | const struct icst_params *params; |
17 | u32 oscoff; | 18 | u32 oscoff; |
18 | void *data; | 19 | void *data; |
19 | void (*setvco)(struct clk *, struct icst307_vco vco); | 20 | void (*setvco)(struct clk *, struct icst_vco vco); |
20 | }; | 21 | }; |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index b77bc407b77d..ded71343553f 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -379,7 +379,7 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
379 | /* | 379 | /* |
380 | * Clock handling | 380 | * Clock handling |
381 | */ | 381 | */ |
382 | static const struct icst307_params versatile_oscvco_params = { | 382 | static const struct icst_params versatile_oscvco_params = { |
383 | .ref = 24000, | 383 | .ref = 24000, |
384 | .vco_max = 200000, | 384 | .vco_max = 200000, |
385 | .vd_min = 4 + 8, | 385 | .vd_min = 4 + 8, |
@@ -388,7 +388,7 @@ static const struct icst307_params versatile_oscvco_params = { | |||
388 | .rd_max = 127 + 2, | 388 | .rd_max = 127 + 2, |
389 | }; | 389 | }; |
390 | 390 | ||
391 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) | 391 | static void versatile_oscvco_set(struct clk *clk, struct icst_vco vco) |
392 | { | 392 | { |
393 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); | 393 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); |
394 | void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; | 394 | void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; |