diff options
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 9833d73511a1..08baa18497b2 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -126,7 +126,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
126 | ret = arch_clock->clk_set_rate(clk, rate); | 126 | ret = arch_clock->clk_set_rate(clk, rate); |
127 | if (ret == 0) { | 127 | if (ret == 0) { |
128 | if (clk->recalc) | 128 | if (clk->recalc) |
129 | clk->recalc(clk); | 129 | clk->rate = clk->recalc(clk); |
130 | propagate_rate(clk); | 130 | propagate_rate(clk); |
131 | } | 131 | } |
132 | spin_unlock_irqrestore(&clockfw_lock, flags); | 132 | spin_unlock_irqrestore(&clockfw_lock, flags); |
@@ -148,7 +148,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
148 | ret = arch_clock->clk_set_parent(clk, parent); | 148 | ret = arch_clock->clk_set_parent(clk, parent); |
149 | if (ret == 0) { | 149 | if (ret == 0) { |
150 | if (clk->recalc) | 150 | if (clk->recalc) |
151 | clk->recalc(clk); | 151 | clk->rate = clk->recalc(clk); |
152 | propagate_rate(clk); | 152 | propagate_rate(clk); |
153 | } | 153 | } |
154 | spin_unlock_irqrestore(&clockfw_lock, flags); | 154 | spin_unlock_irqrestore(&clockfw_lock, flags); |
@@ -188,12 +188,9 @@ static int __init omap_clk_setup(char *str) | |||
188 | __setup("mpurate=", omap_clk_setup); | 188 | __setup("mpurate=", omap_clk_setup); |
189 | 189 | ||
190 | /* Used for clocks that always have same value as the parent clock */ | 190 | /* Used for clocks that always have same value as the parent clock */ |
191 | void followparent_recalc(struct clk *clk) | 191 | unsigned long followparent_recalc(struct clk *clk) |
192 | { | 192 | { |
193 | if (clk == NULL || IS_ERR(clk)) | 193 | return clk->parent->rate; |
194 | return; | ||
195 | |||
196 | clk->rate = clk->parent->rate; | ||
197 | } | 194 | } |
198 | 195 | ||
199 | void clk_reparent(struct clk *child, struct clk *parent) | 196 | void clk_reparent(struct clk *child, struct clk *parent) |
@@ -214,7 +211,7 @@ void propagate_rate(struct clk * tclk) | |||
214 | 211 | ||
215 | list_for_each_entry(clkp, &tclk->children, sibling) { | 212 | list_for_each_entry(clkp, &tclk->children, sibling) { |
216 | if (clkp->recalc) | 213 | if (clkp->recalc) |
217 | clkp->recalc(clkp); | 214 | clkp->rate = clkp->recalc(clkp); |
218 | propagate_rate(clkp); | 215 | propagate_rate(clkp); |
219 | } | 216 | } |
220 | } | 217 | } |
@@ -234,7 +231,7 @@ void recalculate_root_clocks(void) | |||
234 | 231 | ||
235 | list_for_each_entry(clkp, &root_clks, sibling) { | 232 | list_for_each_entry(clkp, &root_clks, sibling) { |
236 | if (clkp->recalc) | 233 | if (clkp->recalc) |
237 | clkp->recalc(clkp); | 234 | clkp->rate = clkp->recalc(clkp); |
238 | propagate_rate(clkp); | 235 | propagate_rate(clkp); |
239 | } | 236 | } |
240 | } | 237 | } |