diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-31 02:20:57 +0200 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2015-08-25 01:48:52 +0200 |
commit | ac269395cdd80b9b088d9b5306015bd4b8bc176d (patch) | |
tree | fa0f1d574437ee6d8cf8ddfaa7b7697fbd346916 /drivers/clk/qcom/clk-rcg.c | |
parent | clk: stm32f4: Convert to clk_hw based provider APIs (diff) | |
download | linux-ac269395cdd80b9b088d9b5306015bd4b8bc176d.tar.xz linux-ac269395cdd80b9b088d9b5306015bd4b8bc176d.zip |
clk: qcom: Convert to clk_hw based provider APIs
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/qcom/clk-rcg.c')
-rw-r--r-- | drivers/clk/qcom/clk-rcg.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/clk/qcom/clk-rcg.c b/drivers/clk/qcom/clk-rcg.c index 070162abc2b6..bccedc4b5756 100644 --- a/drivers/clk/qcom/clk-rcg.c +++ b/drivers/clk/qcom/clk-rcg.c @@ -59,7 +59,7 @@ static u8 clk_rcg_get_parent(struct clk_hw *hw) err: pr_debug("%s: Clock %s has invalid parent, using default.\n", - __func__, __clk_get_name(hw->clk)); + __func__, clk_hw_get_name(hw)); return 0; } @@ -95,7 +95,7 @@ static u8 clk_dyn_rcg_get_parent(struct clk_hw *hw) err: pr_debug("%s: Clock %s has invalid parent, using default.\n", - __func__, __clk_get_name(hw->clk)); + __func__, clk_hw_get_name(hw)); return 0; } @@ -409,7 +409,7 @@ static int _freq_tbl_determine_rate(struct clk_hw *hw, const struct freq_tbl *f, const struct parent_map *parent_map) { unsigned long clk_flags, rate = req->rate; - struct clk *p; + struct clk_hw *p; int index; f = qcom_find_freq(f, rate); @@ -421,7 +421,7 @@ static int _freq_tbl_determine_rate(struct clk_hw *hw, const struct freq_tbl *f, return index; clk_flags = clk_hw_get_flags(hw); - p = clk_get_parent_by_index(hw->clk, index); + p = clk_hw_get_parent_by_index(hw, index); if (clk_flags & CLK_SET_RATE_PARENT) { rate = rate * f->pre_div; if (f->n) { @@ -431,9 +431,9 @@ static int _freq_tbl_determine_rate(struct clk_hw *hw, const struct freq_tbl *f, rate = tmp; } } else { - rate = __clk_get_rate(p); + rate = clk_hw_get_rate(p); } - req->best_parent_hw = __clk_get_hw(p); + req->best_parent_hw = p; req->best_parent_rate = rate; req->rate = f->freq; @@ -469,12 +469,11 @@ static int clk_rcg_bypass_determine_rate(struct clk_hw *hw, { struct clk_rcg *rcg = to_clk_rcg(hw); const struct freq_tbl *f = rcg->freq_tbl; - struct clk *p; + struct clk_hw *p; int index = qcom_find_src_index(hw, rcg->s.parent_map, f->src); - p = clk_get_parent_by_index(hw->clk, index); - req->best_parent_hw = __clk_get_hw(p); - req->best_parent_rate = __clk_round_rate(p, req->rate); + req->best_parent_hw = p = clk_hw_get_parent_by_index(hw, index); + req->best_parent_rate = clk_hw_round_rate(p, req->rate); req->rate = req->best_parent_rate; return 0; |