diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-14 15:09:34 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:37 -0400 |
commit | d1914c7e75cff736e2c2dac13ad2fe20c2567e68 (patch) | |
tree | a9913c63b86caf9122b6b1246e8045b9b436c98e /arch/arm/mach-versatile | |
parent | f5fc00826d1e60af0e22cb9f65b933d823a8ed84 (diff) |
ARM: Make Integrator/Versatile/Reaview VCO code similar
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/core.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-versatile/include/mach/clkdev.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 490fc7597bb6..957bbde83d34 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -370,21 +370,19 @@ static const struct icst_params versatile_oscvco_params = { | |||
370 | 370 | ||
371 | static void versatile_oscvco_set(struct clk *clk, struct icst_vco vco) | 371 | static void versatile_oscvco_set(struct clk *clk, struct icst_vco vco) |
372 | { | 372 | { |
373 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); | 373 | void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; |
374 | void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; | ||
375 | u32 val; | 374 | u32 val; |
376 | 375 | ||
377 | val = readl(sys + clk->oscoff) & ~0x7ffff; | 376 | val = readl(clk->vcoreg) & ~0x7ffff; |
378 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | 377 | val |= vco.v | (vco.r << 9) | (vco.s << 16); |
379 | 378 | ||
380 | writel(0xa05f, sys_lock); | 379 | writel(0xa05f, sys_lock); |
381 | writel(val, sys + clk->oscoff); | 380 | writel(val, clk->vcoreg); |
382 | writel(0, sys_lock); | 381 | writel(0, sys_lock); |
383 | } | 382 | } |
384 | 383 | ||
385 | static struct clk osc4_clk = { | 384 | static struct clk osc4_clk = { |
386 | .params = &versatile_oscvco_params, | 385 | .params = &versatile_oscvco_params, |
387 | .oscoff = VERSATILE_SYS_OSCCLCD_OFFSET, | ||
388 | .setvco = versatile_oscvco_set, | 386 | .setvco = versatile_oscvco_set, |
389 | }; | 387 | }; |
390 | 388 | ||
@@ -831,6 +829,8 @@ void __init versatile_init(void) | |||
831 | { | 829 | { |
832 | int i; | 830 | int i; |
833 | 831 | ||
832 | osc4_clk.vcoreg = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET; | ||
833 | |||
834 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 834 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
835 | 835 | ||
836 | platform_device_register(&versatile_flash_device); | 836 | platform_device_register(&versatile_flash_device); |
diff --git a/arch/arm/mach-versatile/include/mach/clkdev.h b/arch/arm/mach-versatile/include/mach/clkdev.h index fefe4671255c..baea03c9ad45 100644 --- a/arch/arm/mach-versatile/include/mach/clkdev.h +++ b/arch/arm/mach-versatile/include/mach/clkdev.h | |||
@@ -6,7 +6,7 @@ | |||
6 | struct clk { | 6 | struct clk { |
7 | unsigned long rate; | 7 | unsigned long rate; |
8 | const struct icst_params *params; | 8 | const struct icst_params *params; |
9 | u32 oscoff; | 9 | void __iomem *vcoreg; |
10 | void (*setvco)(struct clk *, struct icst_vco vco); | 10 | void (*setvco)(struct clk *, struct icst_vco vco); |
11 | }; | 11 | }; |
12 | 12 | ||