diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-02-23 00:09:16 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-02-24 14:15:04 -0500 |
commit | 1a3377176b3d41e3f30483a624cdafadeeb4064f (patch) | |
tree | 6e7fd09d43e95a5757affc4e134ed174b32f4b4c /arch/arm/mach-omap2/clock.c | |
parent | 17d092733d9ffd7fcf6da36169a60caf8400fc4c (diff) |
OMAP2 clock: drop CONFIG_PARTICIPANT clock flag
It turns out that the only purpose of the CONFIG_PARTICIPANT clock
flag is to prevent omap2_clk_set_rate() and omap2_clk_set_parent()
from being executed on clocks with that flag set. The rate-changing
component can be more directly accomplished by dropping the .set_rate
and .round_rate function pointers from those CONFIG_PARTICIPANT struct
clks. As far as the parent-changing component is concerned, it turns
out that none of the CONFIG_PARTICIPANT clocks have multiple parent
choices, so all that is necessary is for omap2_clk_set_parent() to
bail out early if the new parent is equal to the old parent.
Implement this change and get rid of the flag, which has always had a
confusing name (it appears to be a Kconfig option, falsely).
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 3bb3292ec469..9df5937999cb 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -318,11 +318,6 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate) | |||
318 | 318 | ||
319 | pr_debug("clock: set_rate for clock %s to rate %ld\n", clk->name, rate); | 319 | pr_debug("clock: set_rate for clock %s to rate %ld\n", clk->name, rate); |
320 | 320 | ||
321 | /* CONFIG_PARTICIPANT clocks are changed only in sets via the | ||
322 | rate table mechanism, driven by mpu_speed */ | ||
323 | if (clk->flags & CONFIG_PARTICIPANT) | ||
324 | return -EINVAL; | ||
325 | |||
326 | /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ | 321 | /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ |
327 | if (clk->set_rate) | 322 | if (clk->set_rate) |
328 | ret = clk->set_rate(clk, rate); | 323 | ret = clk->set_rate(clk, rate); |
@@ -332,12 +327,12 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate) | |||
332 | 327 | ||
333 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | 328 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) |
334 | { | 329 | { |
335 | if (clk->flags & CONFIG_PARTICIPANT) | ||
336 | return -EINVAL; | ||
337 | |||
338 | if (!clk->clksel) | 330 | if (!clk->clksel) |
339 | return -EINVAL; | 331 | return -EINVAL; |
340 | 332 | ||
333 | if (clk->parent == new_parent) | ||
334 | return 0; | ||
335 | |||
341 | return omap2_clksel_set_parent(clk, new_parent); | 336 | return omap2_clksel_set_parent(clk, new_parent); |
342 | } | 337 | } |
343 | 338 | ||