diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-14 20:09:34 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 09:35:37 +0100 |
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 3e211021685..2f9de622d1f 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 = { static void impd1_setvco(struct clk *clk, struct icst_vco vco) { struct impd1_module *impd1 = clk->data; - int vconr = clk - impd1->vcos; - u32 val; - - val = vco.v | (vco.r << 9) | (vco.s << 16); + u32 val = vco.v | (vco.r << 9) | (vco.s << 16); writel(0xa05f, impd1->base + IMPD1_LOCK); - switch (vconr) { - case 0: - writel(val, impd1->base + IMPD1_OSC1); - break; - case 1: - writel(val, impd1->base + IMPD1_OSC2); - break; - } + writel(val, clk->vcoreg); writel(0, impd1->base + IMPD1_LOCK); #ifdef DEBUG @@ -381,6 +371,8 @@ static int impd1_probe(struct lm_device *dev) impd1->vcos[i].data = impd1, impd1->vcos[i].setvco = impd1_setvco; } + impd1->vcos[0].vcoreg = impd1->base + IMPD1_OSC1; + impd1->vcos[1].vcoreg = impd1->base + IMPD1_OSC2; impd1->clks[0] = clkdev_alloc(&impd1->vcos[0], NULL, "lm%x:01000", dev->id); |