[ARM] omap: move clock propagation into core omap clock code
Move the clock propagation calls for set_parent and set_rate into the core omap clock code, rather than having these calls scattered throughout the OMAP1 and OMAP2 implementations. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
2e777bf1f2
commit
c6af450852
@@ -628,9 +628,6 @@ static int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
|
|
||||||
propagate_rate(clk);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -684,9 +684,6 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
|
|||||||
if (clk->set_rate != NULL)
|
if (clk->set_rate != NULL)
|
||||||
ret = clk->set_rate(clk, rate);
|
ret = clk->set_rate(clk, rate);
|
||||||
|
|
||||||
if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
|
|
||||||
propagate_rate(clk);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -774,9 +771,6 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
|
|||||||
pr_debug("clock: set parent of %s to %s (new rate %ld)\n",
|
pr_debug("clock: set parent of %s to %s (new rate %ld)\n",
|
||||||
clk->name, clk->parent->name, clk->rate);
|
clk->name, clk->parent->name, clk->rate);
|
||||||
|
|
||||||
if (unlikely(clk->flags & RATE_PROPAGATES))
|
|
||||||
propagate_rate(clk);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -182,6 +182,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
|
|||||||
spin_lock_irqsave(&clockfw_lock, flags);
|
spin_lock_irqsave(&clockfw_lock, flags);
|
||||||
if (arch_clock->clk_set_rate)
|
if (arch_clock->clk_set_rate)
|
||||||
ret = arch_clock->clk_set_rate(clk, rate);
|
ret = arch_clock->clk_set_rate(clk, rate);
|
||||||
|
if (ret == 0 && (clk->flags & RATE_PROPAGATES))
|
||||||
|
propagate_rate(clk);
|
||||||
spin_unlock_irqrestore(&clockfw_lock, flags);
|
spin_unlock_irqrestore(&clockfw_lock, flags);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -199,6 +201,8 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
|
|||||||
spin_lock_irqsave(&clockfw_lock, flags);
|
spin_lock_irqsave(&clockfw_lock, flags);
|
||||||
if (arch_clock->clk_set_parent)
|
if (arch_clock->clk_set_parent)
|
||||||
ret = arch_clock->clk_set_parent(clk, parent);
|
ret = arch_clock->clk_set_parent(clk, parent);
|
||||||
|
if (ret == 0 && (clk->flags & RATE_PROPAGATES))
|
||||||
|
propagate_rate(clk);
|
||||||
spin_unlock_irqrestore(&clockfw_lock, flags);
|
spin_unlock_irqrestore(&clockfw_lock, flags);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user