Lines Matching refs:hwd
144 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_clkin_set_parent() local
146 hwd->parent = index; in cdce706_clkin_set_parent()
152 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_clkin_get_parent() local
154 return hwd->parent; in cdce706_clkin_get_parent()
166 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_pll_recalc_rate() local
168 dev_dbg(&hwd->dev_data->client->dev, in cdce706_pll_recalc_rate()
170 __func__, hwd->idx, hwd->mux, hwd->mul, hwd->div); in cdce706_pll_recalc_rate()
172 if (!hwd->mux) { in cdce706_pll_recalc_rate()
173 if (hwd->div && hwd->mul) { in cdce706_pll_recalc_rate()
174 u64 res = (u64)parent_rate * hwd->mul; in cdce706_pll_recalc_rate()
176 do_div(res, hwd->div); in cdce706_pll_recalc_rate()
180 if (hwd->div) in cdce706_pll_recalc_rate()
181 return parent_rate / hwd->div; in cdce706_pll_recalc_rate()
189 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_pll_round_rate() local
193 dev_dbg(&hwd->dev_data->client->dev, in cdce706_pll_round_rate()
200 hwd->mul = mul; in cdce706_pll_round_rate()
201 hwd->div = div; in cdce706_pll_round_rate()
203 dev_dbg(&hwd->dev_data->client->dev, in cdce706_pll_round_rate()
205 __func__, hwd->idx, mul, div); in cdce706_pll_round_rate()
207 res = (u64)*parent_rate * hwd->mul; in cdce706_pll_round_rate()
208 do_div(res, hwd->div); in cdce706_pll_round_rate()
215 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_pll_set_rate() local
216 unsigned long mul = hwd->mul, div = hwd->div; in cdce706_pll_set_rate()
219 dev_dbg(&hwd->dev_data->client->dev, in cdce706_pll_set_rate()
221 __func__, hwd->idx, mul, div); in cdce706_pll_set_rate()
223 err = cdce706_reg_update(hwd->dev_data, in cdce706_pll_set_rate()
224 CDCE706_PLL_HI(hwd->idx), in cdce706_pll_set_rate()
232 err = cdce706_reg_write(hwd->dev_data, in cdce706_pll_set_rate()
233 CDCE706_PLL_M_LOW(hwd->idx), in cdce706_pll_set_rate()
238 err = cdce706_reg_write(hwd->dev_data, in cdce706_pll_set_rate()
239 CDCE706_PLL_N_LOW(hwd->idx), in cdce706_pll_set_rate()
244 err = cdce706_reg_update(hwd->dev_data, in cdce706_pll_set_rate()
246 CDCE706_PLL_FVCO_MASK(hwd->idx), in cdce706_pll_set_rate()
248 CDCE706_PLL_FVCO_MASK(hwd->idx) : 0); in cdce706_pll_set_rate()
260 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_divider_set_parent() local
262 if (hwd->parent == index) in cdce706_divider_set_parent()
264 hwd->parent = index; in cdce706_divider_set_parent()
265 return cdce706_reg_update(hwd->dev_data, in cdce706_divider_set_parent()
266 CDCE706_DIVIDER_PLL(hwd->idx), in cdce706_divider_set_parent()
267 CDCE706_DIVIDER_PLL_MASK(hwd->idx), in cdce706_divider_set_parent()
268 index << CDCE706_DIVIDER_PLL_SHIFT(hwd->idx)); in cdce706_divider_set_parent()
273 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_divider_get_parent() local
275 return hwd->parent; in cdce706_divider_get_parent()
281 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_divider_recalc_rate() local
283 dev_dbg(&hwd->dev_data->client->dev, in cdce706_divider_recalc_rate()
285 __func__, hwd->idx, hwd->div); in cdce706_divider_recalc_rate()
286 if (hwd->div) in cdce706_divider_recalc_rate()
287 return parent_rate / hwd->div; in cdce706_divider_recalc_rate()
294 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_divider_determine_rate() local
295 struct cdce706_dev_data *cdce = hwd->dev_data; in cdce706_divider_determine_rate()
299 dev_dbg(&hwd->dev_data->client->dev, in cdce706_divider_determine_rate()
338 dev_dbg(&hwd->dev_data->client->dev, in cdce706_divider_determine_rate()
346 dev_dbg(&hwd->dev_data->client->dev, in cdce706_divider_determine_rate()
351 hwd->div = div; in cdce706_divider_determine_rate()
353 dev_dbg(&hwd->dev_data->client->dev, in cdce706_divider_determine_rate()
355 __func__, hwd->idx, div); in cdce706_divider_determine_rate()
364 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_divider_set_rate() local
366 dev_dbg(&hwd->dev_data->client->dev, in cdce706_divider_set_rate()
368 __func__, hwd->idx, hwd->div); in cdce706_divider_set_rate()
370 return cdce706_reg_update(hwd->dev_data, in cdce706_divider_set_rate()
371 CDCE706_DIVIDER(hwd->idx), in cdce706_divider_set_rate()
373 hwd->div); in cdce706_divider_set_rate()
386 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_clkout_prepare() local
388 return cdce706_reg_update(hwd->dev_data, CDCE706_CLKOUT(hwd->idx), in cdce706_clkout_prepare()
395 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_clkout_unprepare() local
397 cdce706_reg_update(hwd->dev_data, CDCE706_CLKOUT(hwd->idx), in cdce706_clkout_unprepare()
403 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_clkout_set_parent() local
405 if (hwd->parent == index) in cdce706_clkout_set_parent()
407 hwd->parent = index; in cdce706_clkout_set_parent()
408 return cdce706_reg_update(hwd->dev_data, in cdce706_clkout_set_parent()
409 CDCE706_CLKOUT(hwd->idx), in cdce706_clkout_set_parent()
415 struct cdce706_hw_data *hwd = to_hw_data(hw); in cdce706_clkout_get_parent() local
417 return hwd->parent; in cdce706_clkout_get_parent()