Lines Matching refs:factor_hw

66 static int owl_clk_val_best(const struct owl_factor_hw *factor_hw,  in owl_clk_val_best()  argument
70 const struct clk_factor_table *clkt = factor_hw->table; in owl_clk_val_best()
84 for (clkt = factor_hw->table; clkt->div; clkt++) { in owl_clk_val_best()
120 const struct owl_factor_hw *factor_hw, in owl_factor_helper_round_rate() argument
124 const struct clk_factor_table *clkt = factor_hw->table; in owl_factor_helper_round_rate()
127 val = owl_clk_val_best(factor_hw, &common->hw, rate, parent_rate); in owl_factor_helper_round_rate()
137 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_round_rate() local
139 return owl_factor_helper_round_rate(&factor->common, factor_hw, in owl_factor_round_rate()
144 const struct owl_factor_hw *factor_hw, in owl_factor_helper_recalc_rate() argument
147 const struct clk_factor_table *clkt = factor_hw->table; in owl_factor_helper_recalc_rate()
154 regmap_read(common->regmap, factor_hw->reg, &reg); in owl_factor_helper_recalc_rate()
156 val = reg >> factor_hw->shift; in owl_factor_helper_recalc_rate()
157 val &= div_mask(factor_hw); in owl_factor_helper_recalc_rate()
161 WARN(!(factor_hw->fct_flags & CLK_DIVIDER_ALLOW_ZERO), in owl_factor_helper_recalc_rate()
177 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_recalc_rate() local
180 return owl_factor_helper_recalc_rate(common, factor_hw, parent_rate); in owl_factor_recalc_rate()
184 const struct owl_factor_hw *factor_hw, in owl_factor_helper_set_rate() argument
190 val = _get_table_val(factor_hw->table, rate, parent_rate); in owl_factor_helper_set_rate()
192 if (val > div_mask(factor_hw)) in owl_factor_helper_set_rate()
193 val = div_mask(factor_hw); in owl_factor_helper_set_rate()
195 regmap_read(common->regmap, factor_hw->reg, &reg); in owl_factor_helper_set_rate()
197 reg &= ~(div_mask(factor_hw) << factor_hw->shift); in owl_factor_helper_set_rate()
198 reg |= val << factor_hw->shift; in owl_factor_helper_set_rate()
200 regmap_write(common->regmap, factor_hw->reg, reg); in owl_factor_helper_set_rate()
209 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_set_rate() local
212 return owl_factor_helper_set_rate(common, factor_hw, in owl_factor_set_rate()