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-integrator/impd1.c | |
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-integrator/impd1.c')
-rw-r--r-- | arch/arm/mach-integrator/impd1.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 3e2110216851..2f9de622d1fa 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -55,20 +55,10 @@ static const struct icst_params impd1_vco_params = { | |||
55 | static void impd1_setvco(struct clk *clk, struct icst_vco vco) | 55 | static void impd1_setvco(struct clk *clk, struct icst_vco vco) |
56 | { | 56 | { |
57 | struct impd1_module *impd1 = clk->data; | 57 | struct impd1_module *impd1 = clk->data; |
58 | int vconr = clk - impd1->vcos; | 58 | u32 val = vco.v | (vco.r << 9) | (vco.s << 16); |
59 | u32 val; | ||
60 | |||
61 | val = vco.v | (vco.r << 9) | (vco.s << 16); | ||
62 | 59 | ||
63 | writel(0xa05f, impd1->base + IMPD1_LOCK); | 60 | writel(0xa05f, impd1->base + IMPD1_LOCK); |
64 | switch (vconr) { | 61 | writel(val, clk->vcoreg); |
65 | case 0: | ||
66 | writel(val, impd1->base + IMPD1_OSC1); | ||
67 | break; | ||
68 | case 1: | ||
69 | writel(val, impd1->base + IMPD1_OSC2); | ||
70 | break; | ||
71 | } | ||
72 | writel(0, impd1->base + IMPD1_LOCK); | 62 | writel(0, impd1->base + IMPD1_LOCK); |
73 | 63 | ||
74 | #ifdef DEBUG | 64 | #ifdef DEBUG |
@@ -381,6 +371,8 @@ static int impd1_probe(struct lm_device *dev) | |||
381 | impd1->vcos[i].data = impd1, | 371 | impd1->vcos[i].data = impd1, |
382 | impd1->vcos[i].setvco = impd1_setvco; | 372 | impd1->vcos[i].setvco = impd1_setvco; |
383 | } | 373 | } |
374 | impd1->vcos[0].vcoreg = impd1->base + IMPD1_OSC1; | ||
375 | impd1->vcos[1].vcoreg = impd1->base + IMPD1_OSC2; | ||
384 | 376 | ||
385 | impd1->clks[0] = clkdev_alloc(&impd1->vcos[0], NULL, "lm%x:01000", | 377 | impd1->clks[0] = clkdev_alloc(&impd1->vcos[0], NULL, "lm%x:01000", |
386 | dev->id); | 378 | dev->id); |