diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2014-12-02 02:54:22 -0500 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2014-12-03 19:21:37 -0500 |
commit | 646cafc6aa4d6004d189de1cdc267ab562069ba9 (patch) | |
tree | 6d2f85aecfe37696c0930b1dce17722e863cc804 /arch/mips/alchemy | |
parent | 61c7cddfad266ebb86176723f9c679f25cf705fe (diff) |
clk: Change clk_ops->determine_rate to return a clk_hw as the best parent
This is in preparation for clock providers to not have to deal with struct clk.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/mips/alchemy')
-rw-r--r-- | arch/mips/alchemy/common/clock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c index d7557cde271a..f42dd0a4af20 100644 --- a/arch/mips/alchemy/common/clock.c +++ b/arch/mips/alchemy/common/clock.c | |||
@@ -375,7 +375,7 @@ static long alchemy_calc_div(unsigned long rate, unsigned long prate, | |||
375 | 375 | ||
376 | static long alchemy_clk_fgcs_detr(struct clk_hw *hw, unsigned long rate, | 376 | static long alchemy_clk_fgcs_detr(struct clk_hw *hw, unsigned long rate, |
377 | unsigned long *best_parent_rate, | 377 | unsigned long *best_parent_rate, |
378 | struct clk **best_parent_clk, | 378 | struct clk_hw **best_parent_clk, |
379 | int scale, int maxdiv) | 379 | int scale, int maxdiv) |
380 | { | 380 | { |
381 | struct clk *pc, *bpc, *free; | 381 | struct clk *pc, *bpc, *free; |
@@ -454,7 +454,7 @@ static long alchemy_clk_fgcs_detr(struct clk_hw *hw, unsigned long rate, | |||
454 | } | 454 | } |
455 | 455 | ||
456 | *best_parent_rate = bpr; | 456 | *best_parent_rate = bpr; |
457 | *best_parent_clk = bpc; | 457 | *best_parent_clk = __clk_get_hw(bpc); |
458 | return br; | 458 | return br; |
459 | } | 459 | } |
460 | 460 | ||
@@ -548,7 +548,7 @@ static unsigned long alchemy_clk_fgv1_recalc(struct clk_hw *hw, | |||
548 | 548 | ||
549 | static long alchemy_clk_fgv1_detr(struct clk_hw *hw, unsigned long rate, | 549 | static long alchemy_clk_fgv1_detr(struct clk_hw *hw, unsigned long rate, |
550 | unsigned long *best_parent_rate, | 550 | unsigned long *best_parent_rate, |
551 | struct clk **best_parent_clk) | 551 | struct clk_hw **best_parent_clk) |
552 | { | 552 | { |
553 | return alchemy_clk_fgcs_detr(hw, rate, best_parent_rate, | 553 | return alchemy_clk_fgcs_detr(hw, rate, best_parent_rate, |
554 | best_parent_clk, 2, 512); | 554 | best_parent_clk, 2, 512); |
@@ -680,7 +680,7 @@ static unsigned long alchemy_clk_fgv2_recalc(struct clk_hw *hw, | |||
680 | 680 | ||
681 | static long alchemy_clk_fgv2_detr(struct clk_hw *hw, unsigned long rate, | 681 | static long alchemy_clk_fgv2_detr(struct clk_hw *hw, unsigned long rate, |
682 | unsigned long *best_parent_rate, | 682 | unsigned long *best_parent_rate, |
683 | struct clk **best_parent_clk) | 683 | struct clk_hw **best_parent_clk) |
684 | { | 684 | { |
685 | struct alchemy_fgcs_clk *c = to_fgcs_clk(hw); | 685 | struct alchemy_fgcs_clk *c = to_fgcs_clk(hw); |
686 | int scale, maxdiv; | 686 | int scale, maxdiv; |
@@ -899,7 +899,7 @@ static int alchemy_clk_csrc_setr(struct clk_hw *hw, unsigned long rate, | |||
899 | 899 | ||
900 | static long alchemy_clk_csrc_detr(struct clk_hw *hw, unsigned long rate, | 900 | static long alchemy_clk_csrc_detr(struct clk_hw *hw, unsigned long rate, |
901 | unsigned long *best_parent_rate, | 901 | unsigned long *best_parent_rate, |
902 | struct clk **best_parent_clk) | 902 | struct clk_hw **best_parent_clk) |
903 | { | 903 | { |
904 | struct alchemy_fgcs_clk *c = to_fgcs_clk(hw); | 904 | struct alchemy_fgcs_clk *c = to_fgcs_clk(hw); |
905 | int scale = c->dt[2] == 3 ? 1 : 2; /* au1300 check */ | 905 | int scale = c->dt[2] == 3 ? 1 : 2; /* au1300 check */ |