Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137366
b: refs/heads/master
c: 4da3782
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Mar 3, 2009
1 parent 6c0dacc commit 06ee4d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7aec53acc0504ab2abd73a6051e7b72f48545ceb
refs/heads/master: 4da3782151300237db3abe070f716922889252e0
6 changes: 0 additions & 6 deletions trunk/arch/arm/mach-omap2/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,6 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
if (!parent_div)
return -EINVAL;

if (clk->usecount > 0)
_omap2_clk_disable(clk);

/* Set new source value (previous dividers if any in effect) */
v = __raw_readl(clk->clksel_reg);
v &= ~clk->clksel_mask;
Expand All @@ -819,9 +816,6 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)

_omap2xxx_clk_commit(clk);

if (clk->usecount > 0)
_omap2_clk_enable(clk);

clk_reparent(clk, new_parent);

/* CLKSEL clocks follow their parents' rates, divided by a divisor */
Expand Down
17 changes: 10 additions & 7 deletions trunk/arch/arm/plat-omap/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,16 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
return ret;

spin_lock_irqsave(&clockfw_lock, flags);
if (arch_clock->clk_set_parent)
ret = arch_clock->clk_set_parent(clk, parent);
if (ret == 0) {
if (clk->recalc)
clk->rate = clk->recalc(clk);
propagate_rate(clk);
}
if (clk->usecount == 0) {
if (arch_clock->clk_set_parent)
ret = arch_clock->clk_set_parent(clk, parent);
if (ret == 0) {
if (clk->recalc)
clk->rate = clk->recalc(clk);
propagate_rate(clk);
}
} else
ret = -EBUSY;
spin_unlock_irqrestore(&clockfw_lock, flags);

return ret;
Expand Down

0 comments on commit 06ee4d0

Please sign in to comment.