summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/clock.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-13 13:01:32 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 17:50:10 (GMT)
commitc6af45085211db8720d6b94b3985ce7198d764e3 (patch)
tree81c2402e528cf772256b35eec0e154378b778db1 /arch/arm/plat-omap/clock.c
parent2e777bf1f2482be13c2b678744d3497a4f0a0ec2 (diff)
downloadlinux-fsl-qoriq-c6af45085211db8720d6b94b3985ce7198d764e3.tar.xz
[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>
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r--arch/arm/plat-omap/clock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index ae77e10..b7137c5 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -182,6 +182,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
spin_lock_irqsave(&clockfw_lock, flags);
if (arch_clock->clk_set_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);
return ret;
@@ -198,7 +200,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
spin_lock_irqsave(&clockfw_lock, flags);
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);
return ret;