aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/integrator_cp.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-14 15:09:34 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 04:35:37 -0400
commitd1914c7e75cff736e2c2dac13ad2fe20c2567e68 (patch)
treea9913c63b86caf9122b6b1246e8045b9b436c98e /arch/arm/mach-integrator/integrator_cp.c
parentf5fc00826d1e60af0e22cb9f65b933d823a8ed84 (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-integrator/integrator_cp.c')
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 5a5a8c1c087f..590858004ef6 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -266,8 +266,8 @@ static void __init intcp_init_irq(void)
266/* 266/*
267 * Clock handling 267 * Clock handling
268 */ 268 */
269#define CM_LOCK IO_ADDRESS(INTEGRATOR_HDR_LOCK) 269#define CM_LOCK (__io_address(INTEGRATOR_HDR_BASE)+INTEGRATOR_HDR_LOCK_OFFSET)
270#define CM_AUXOSC IO_ADDRESS(INTEGRATOR_HDR_BASE + 0x1c) 270#define CM_AUXOSC (__io_address(INTEGRATOR_HDR_BASE)+0x1c)
271 271
272static const struct icst_params cp_auxvco_params = { 272static const struct icst_params cp_auxvco_params = {
273 .ref = 24000000, 273 .ref = 24000000,
@@ -285,16 +285,17 @@ static void cp_auxvco_set(struct clk *clk, struct icst_vco vco)
285{ 285{
286 u32 val; 286 u32 val;
287 287
288 val = readl(CM_AUXOSC) & ~0x7ffff; 288 val = readl(clk->vcoreg) & ~0x7ffff;
289 val |= vco.v | (vco.r << 9) | (vco.s << 16); 289 val |= vco.v | (vco.r << 9) | (vco.s << 16);
290 290
291 writel(0xa05f, CM_LOCK); 291 writel(0xa05f, CM_LOCK);
292 writel(val, CM_AUXOSC); 292 writel(val, clk->vcoreg);
293 writel(0, CM_LOCK); 293 writel(0, CM_LOCK);
294} 294}
295 295
296static struct clk cp_auxclk = { 296static struct clk cp_auxclk = {
297 .params = &cp_auxvco_params, 297 .params = &cp_auxvco_params,
298 .vcoreg = CM_AUXOSC,
298 .setvco = cp_auxvco_set, 299 .setvco = cp_auxvco_set,
299}; 300};
300 301