aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/clk-pll.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-07-30 20:20:57 -0400
committerMichael Turquette <mturquette@baylibre.com>2015-08-24 19:48:52 -0400
commitac269395cdd80b9b088d9b5306015bd4b8bc176d (patch)
treefa0f1d574437ee6d8cf8ddfaa7b7697fbd346916 /drivers/clk/qcom/clk-pll.c
parent17ae4b40b475e2de5a0b0b475539624b7162a931 (diff)
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-pll.c')
-rw-r--r--drivers/clk/qcom/clk-pll.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/clk/qcom/clk-pll.c b/drivers/clk/qcom/clk-pll.c
index a34656bec648..5b940d629045 100644
--- a/drivers/clk/qcom/clk-pll.c
+++ b/drivers/clk/qcom/clk-pll.c
@@ -138,13 +138,9 @@ struct pll_freq_tbl *find_freq(const struct pll_freq_tbl *f, unsigned long rate)
138static int 138static int
139clk_pll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) 139clk_pll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
140{ 140{
141 struct clk *parent = __clk_get_parent(hw->clk);
142 struct clk_pll *pll = to_clk_pll(hw); 141 struct clk_pll *pll = to_clk_pll(hw);
143 const struct pll_freq_tbl *f; 142 const struct pll_freq_tbl *f;
144 143
145 req->best_parent_hw = __clk_get_hw(parent);
146 req->best_parent_rate = __clk_get_rate(parent);
147
148 f = find_freq(pll->freq_tbl, req->rate); 144 f = find_freq(pll->freq_tbl, req->rate);
149 if (!f) 145 if (!f)
150 req->rate = clk_pll_recalc_rate(hw, req->best_parent_rate); 146 req->rate = clk_pll_recalc_rate(hw, req->best_parent_rate);
@@ -198,7 +194,7 @@ static int wait_for_pll(struct clk_pll *pll)
198 u32 val; 194 u32 val;
199 int count; 195 int count;
200 int ret; 196 int ret;
201 const char *name = __clk_get_name(pll->clkr.hw.clk); 197 const char *name = clk_hw_get_name(&pll->clkr.hw);
202 198
203 /* Wait for pll to enable. */ 199 /* Wait for pll to enable. */
204 for (count = 200; count > 0; count--) { 200 for (count = 200; count > 0; count--) {
@@ -217,7 +213,7 @@ static int wait_for_pll(struct clk_pll *pll)
217static int clk_pll_vote_enable(struct clk_hw *hw) 213static int clk_pll_vote_enable(struct clk_hw *hw)
218{ 214{
219 int ret; 215 int ret;
220 struct clk_pll *p = to_clk_pll(__clk_get_hw(__clk_get_parent(hw->clk))); 216 struct clk_pll *p = to_clk_pll(clk_hw_get_parent(hw));
221 217
222 ret = clk_enable_regmap(hw); 218 ret = clk_enable_regmap(hw);
223 if (ret) 219 if (ret)