diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-14 21:09:34 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 10:35:37 +0200 |
commit | d1914c7e75cff736e2c2dac13ad2fe20c2567e68 (patch) | |
tree | a9913c63b86caf9122b6b1246e8045b9b436c98e /arch/arm/mach-versatile | |
parent | ARM: Realview/Versatile: separate out common sched_clock() (diff) | |
download | linux-d1914c7e75cff736e2c2dac13ad2fe20c2567e68.tar.xz linux-d1914c7e75cff736e2c2dac13ad2fe20c2567e68.zip |
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 = { static void versatile_oscvco_set(struct clk *clk, struct icst_vco vco) { - void __iomem *sys = __io_address(VERSATILE_SYS_BASE); - void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; + void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; u32 val; - val = readl(sys + clk->oscoff) & ~0x7ffff; + val = readl(clk->vcoreg) & ~0x7ffff; val |= vco.v | (vco.r << 9) | (vco.s << 16); writel(0xa05f, sys_lock); - writel(val, sys + clk->oscoff); + writel(val, clk->vcoreg); writel(0, sys_lock); } static struct clk osc4_clk = { .params = &versatile_oscvco_params, - .oscoff = VERSATILE_SYS_OSCCLCD_OFFSET, .setvco = versatile_oscvco_set, }; @@ -831,6 +829,8 @@ void __init versatile_init(void) { int i; + osc4_clk.vcoreg = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET; + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 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 @@ struct clk { unsigned long rate; const struct icst_params *params; - u32 oscoff; + void __iomem *vcoreg; void (*setvco)(struct clk *, struct icst_vco vco); }; |