diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-11-13 08:44:15 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-08 12:50:11 -0500 |
commit | 9a5fedac187f30116013a8420149d4ca11a44f0d (patch) | |
tree | 3cdcd9e8887a6fa41d1ddd85eb8c759990adc27b /arch/arm/mach-omap2/clock24xx.c | |
parent | a9e882096317a088087b608d272da7029a6cc8c8 (diff) |
[ARM] omap: move propagate_rate() calls into generic omap clock code
propagate_rate() is recursive, so it makes sense to minimise the
amount of stack which is used for each recursion. So, rather than
recursing back into it from the ->recalc functions if RATE_PROPAGATES
is set, do that test at the higher level.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock24xx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c index 866a618c4d8d..3a0a1b8aa0bb 100644 --- a/arch/arm/mach-omap2/clock24xx.c +++ b/arch/arm/mach-omap2/clock24xx.c | |||
@@ -199,8 +199,6 @@ long omap2_dpllcore_round_rate(unsigned long target_rate) | |||
199 | static void omap2_dpllcore_recalc(struct clk *clk) | 199 | static void omap2_dpllcore_recalc(struct clk *clk) |
200 | { | 200 | { |
201 | clk->rate = omap2_get_dpll_rate_24xx(clk); | 201 | clk->rate = omap2_get_dpll_rate_24xx(clk); |
202 | |||
203 | propagate_rate(clk); | ||
204 | } | 202 | } |
205 | 203 | ||
206 | static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate) | 204 | static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate) |
@@ -442,13 +440,11 @@ static u32 omap2_get_sysclkdiv(void) | |||
442 | static void omap2_osc_clk_recalc(struct clk *clk) | 440 | static void omap2_osc_clk_recalc(struct clk *clk) |
443 | { | 441 | { |
444 | clk->rate = omap2_get_apll_clkin() * omap2_get_sysclkdiv(); | 442 | clk->rate = omap2_get_apll_clkin() * omap2_get_sysclkdiv(); |
445 | propagate_rate(clk); | ||
446 | } | 443 | } |
447 | 444 | ||
448 | static void omap2_sys_clk_recalc(struct clk *clk) | 445 | static void omap2_sys_clk_recalc(struct clk *clk) |
449 | { | 446 | { |
450 | clk->rate = clk->parent->rate / omap2_get_sysclkdiv(); | 447 | clk->rate = clk->parent->rate / omap2_get_sysclkdiv(); |
451 | propagate_rate(clk); | ||
452 | } | 448 | } |
453 | 449 | ||
454 | /* | 450 | /* |
@@ -502,7 +498,9 @@ int __init omap2_clk_init(void) | |||
502 | clk_init(&omap2_clk_functions); | 498 | clk_init(&omap2_clk_functions); |
503 | 499 | ||
504 | omap2_osc_clk_recalc(&osc_ck); | 500 | omap2_osc_clk_recalc(&osc_ck); |
501 | propagate_rate(&osc_ck); | ||
505 | omap2_sys_clk_recalc(&sys_ck); | 502 | omap2_sys_clk_recalc(&sys_ck); |
503 | propagate_rate(&sys_ck); | ||
506 | 504 | ||
507 | for (clkp = onchip_24xx_clks; | 505 | for (clkp = onchip_24xx_clks; |
508 | clkp < onchip_24xx_clks + ARRAY_SIZE(onchip_24xx_clks); | 506 | clkp < onchip_24xx_clks + ARRAY_SIZE(onchip_24xx_clks); |