From: Paul Walmsley Date: Mon, 27 Aug 2007 08:39:09 +0000 (-0600) Subject: omap2 clock: stop using clk->src_offset in omap2_clk_set_parent() X-Git-Tag: v2.6.23-omap1~114 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e43fc23f5de1c811722e093f0426627c2e5126da;p=linux-2.6-omap-h63xx.git omap2 clock: stop using clk->src_offset in omap2_clk_set_parent() Stop using clk->src_offset in omap2_clk_set_parent(); use what we get from the clksel code instead. Signed-off-by: Paul Walmsley Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 3842f6dcc03..c9d3b2c219b 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -885,7 +885,7 @@ static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) /* Set new source value (previous dividers if any in effect) */ reg_val = __raw_readl(src_addr) & ~field_mask; - reg_val |= (field_val << clk->src_offset); + reg_val |= (field_val << mask_to_shift(field_mask)); __raw_writel(reg_val, src_addr); wmb(); @@ -906,6 +906,9 @@ static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) if (parent_div > 0) clk->rate /= parent_div; + pr_debug("clock: set parent of %s to %s (new rate %ld)\n", + clk->name, clk->parent->name, clk->rate); + if (unlikely(clk->flags & RATE_PROPAGATES)) propagate_rate(clk);