Skip to content

Commit 6f8e853

Browse files
Tero KristoMichael Turquette
authored andcommitted
ARM: OMAP2+: clock: fix DPLL code to use new determine rate APIs
While the change for determine_rate clock operation was merged, the OMAP counterpart using these calls was overlooked for some reason, and caused boot failures on at least OMAP4 platforms. Fixed by updating the DPLL API calls to use the new parameters. Signed-off-by: Tero Kristo <t-kristo@ti.com> Fixes: 646cafc ("clk: Change clk_ops->determine_rate") Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Kevin Hilman <khilman@linaro.org> Reported-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Michael Turquette <mturquette@linaro.org>
1 parent b1924c2 commit 6f8e853

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arch/arm/mach-omap2/dpll3xxx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void omap3_noncore_dpll_disable(struct clk_hw *hw)
474474
*/
475475
long omap3_noncore_dpll_determine_rate(struct clk_hw *hw, unsigned long rate,
476476
unsigned long *best_parent_rate,
477-
struct clk **best_parent_clk)
477+
struct clk_hw **best_parent_clk)
478478
{
479479
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
480480
struct dpll_data *dd;
@@ -488,10 +488,10 @@ long omap3_noncore_dpll_determine_rate(struct clk_hw *hw, unsigned long rate,
488488

489489
if (__clk_get_rate(dd->clk_bypass) == rate &&
490490
(dd->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
491-
*best_parent_clk = dd->clk_bypass;
491+
*best_parent_clk = __clk_get_hw(dd->clk_bypass);
492492
} else {
493493
rate = omap2_dpll_round_rate(hw, rate, best_parent_rate);
494-
*best_parent_clk = dd->clk_ref;
494+
*best_parent_clk = __clk_get_hw(dd->clk_ref);
495495
}
496496

497497
*best_parent_rate = rate;

arch/arm/mach-omap2/dpll44xx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw,
223223
*/
224224
long omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw, unsigned long rate,
225225
unsigned long *best_parent_rate,
226-
struct clk **best_parent_clk)
226+
struct clk_hw **best_parent_clk)
227227
{
228228
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
229229
struct dpll_data *dd;
@@ -237,11 +237,11 @@ long omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw, unsigned long rate,
237237

238238
if (__clk_get_rate(dd->clk_bypass) == rate &&
239239
(dd->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
240-
*best_parent_clk = dd->clk_bypass;
240+
*best_parent_clk = __clk_get_hw(dd->clk_bypass);
241241
} else {
242242
rate = omap4_dpll_regm4xen_round_rate(hw, rate,
243243
best_parent_rate);
244-
*best_parent_clk = dd->clk_ref;
244+
*best_parent_clk = __clk_get_hw(dd->clk_ref);
245245
}
246246

247247
*best_parent_rate = rate;

include/linux/clk/ti.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ int omap3_noncore_dpll_set_rate_and_parent(struct clk_hw *hw,
264264
long omap3_noncore_dpll_determine_rate(struct clk_hw *hw,
265265
unsigned long rate,
266266
unsigned long *best_parent_rate,
267-
struct clk **best_parent_clk);
267+
struct clk_hw **best_parent_clk);
268268
unsigned long omap4_dpll_regm4xen_recalc(struct clk_hw *hw,
269269
unsigned long parent_rate);
270270
long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw,
@@ -273,7 +273,7 @@ long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw,
273273
long omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw,
274274
unsigned long rate,
275275
unsigned long *best_parent_rate,
276-
struct clk **best_parent_clk);
276+
struct clk_hw **best_parent_clk);
277277
u8 omap2_init_dpll_parent(struct clk_hw *hw);
278278
unsigned long omap3_dpll_recalc(struct clk_hw *hw, unsigned long parent_rate);
279279
long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate,

0 commit comments

Comments
 (0)