aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-13 08:01:32 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 12:50:10 -0500
commitc6af45085211db8720d6b94b3985ce7198d764e3 (patch)
tree81c2402e528cf772256b35eec0e154378b778db1 /arch
parent2e777bf1f2482be13c2b678744d3497a4f0a0ec2 (diff)
[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')
-rw-r--r--arch/arm/mach-omap1/clock.c3
-rw-r--r--arch/arm/mach-omap2/clock.c6
-rw-r--r--arch/arm/plat-omap/clock.c6
3 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index ff408105ffb2..ee1b9f20544a 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -628,9 +628,6 @@ static int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
628 ret = 0; 628 ret = 0;
629 } 629 }
630 630
631 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
632 propagate_rate(clk);
633
634 return ret; 631 return ret;
635} 632}
636 633
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 76afb7b4482c..7a1d56af9e47 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -684,9 +684,6 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
684 if (clk->set_rate != NULL) 684 if (clk->set_rate != NULL)
685 ret = clk->set_rate(clk, rate); 685 ret = clk->set_rate(clk, rate);
686 686
687 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
688 propagate_rate(clk);
689
690 return ret; 687 return ret;
691} 688}
692 689
@@ -774,9 +771,6 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
774 pr_debug("clock: set parent of %s to %s (new rate %ld)\n", 771 pr_debug("clock: set parent of %s to %s (new rate %ld)\n",
775 clk->name, clk->parent->name, clk->rate); 772 clk->name, clk->parent->name, clk->rate);
776 773
777 if (unlikely(clk->flags & RATE_PROPAGATES))
778 propagate_rate(clk);
779
780 return 0; 774 return 0;
781} 775}
782 776
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index ae77e10719f2..b7137c560db4 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)
182 spin_lock_irqsave(&clockfw_lock, flags); 182 spin_lock_irqsave(&clockfw_lock, flags);
183 if (arch_clock->clk_set_rate) 183 if (arch_clock->clk_set_rate)
184 ret = arch_clock->clk_set_rate(clk, rate); 184 ret = arch_clock->clk_set_rate(clk, rate);
185 if (ret == 0 && (clk->flags & RATE_PROPAGATES))
186 propagate_rate(clk);
185 spin_unlock_irqrestore(&clockfw_lock, flags); 187 spin_unlock_irqrestore(&clockfw_lock, flags);
186 188
187 return ret; 189 return ret;
@@ -198,7 +200,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
198 200
199 spin_lock_irqsave(&clockfw_lock, flags); 201 spin_lock_irqsave(&clockfw_lock, flags);
200 if (arch_clock->clk_set_parent) 202 if (arch_clock->clk_set_parent)
201 ret = arch_clock->clk_set_parent(clk, parent); 203 ret = arch_clock->clk_set_parent(clk, parent);
204 if (ret == 0 && (clk->flags & RATE_PROPAGATES))
205 propagate_rate(clk);
202 spin_unlock_irqrestore(&clockfw_lock, flags); 206 spin_unlock_irqrestore(&clockfw_lock, flags);
203 207
204 return ret; 208 return ret;