Lines Matching refs:factor_hw

67 static int owl_clk_val_best(const struct owl_factor_hw *factor_hw,  in owl_clk_val_best()  argument
71 const struct clk_factor_table *clkt = factor_hw->table; in owl_clk_val_best()
85 for (clkt = factor_hw->table; clkt->div; clkt++) { in owl_clk_val_best()
121 const struct owl_factor_hw *factor_hw, in owl_factor_helper_round_rate() argument
125 const struct clk_factor_table *clkt = factor_hw->table; in owl_factor_helper_round_rate()
128 val = owl_clk_val_best(factor_hw, &common->hw, rate, parent_rate); in owl_factor_helper_round_rate()
138 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_round_rate() local
140 return owl_factor_helper_round_rate(&factor->common, factor_hw, in owl_factor_round_rate()
145 const struct owl_factor_hw *factor_hw, in owl_factor_helper_recalc_rate() argument
148 const struct clk_factor_table *clkt = factor_hw->table; in owl_factor_helper_recalc_rate()
155 regmap_read(common->regmap, factor_hw->reg, &reg); in owl_factor_helper_recalc_rate()
157 val = reg >> factor_hw->shift; in owl_factor_helper_recalc_rate()
158 val &= div_mask(factor_hw); in owl_factor_helper_recalc_rate()
162 WARN(!(factor_hw->fct_flags & CLK_DIVIDER_ALLOW_ZERO), in owl_factor_helper_recalc_rate()
178 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_recalc_rate() local
181 return owl_factor_helper_recalc_rate(common, factor_hw, parent_rate); in owl_factor_recalc_rate()
185 const struct owl_factor_hw *factor_hw, in owl_factor_helper_set_rate() argument
191 val = _get_table_val(factor_hw->table, rate, parent_rate); in owl_factor_helper_set_rate()
193 if (val > div_mask(factor_hw)) in owl_factor_helper_set_rate()
194 val = div_mask(factor_hw); in owl_factor_helper_set_rate()
196 regmap_read(common->regmap, factor_hw->reg, &reg); in owl_factor_helper_set_rate()
198 reg &= ~(div_mask(factor_hw) << factor_hw->shift); in owl_factor_helper_set_rate()
199 reg |= val << factor_hw->shift; in owl_factor_helper_set_rate()
201 regmap_write(common->regmap, factor_hw->reg, reg); in owl_factor_helper_set_rate()
210 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_set_rate() local
213 return owl_factor_helper_set_rate(common, factor_hw, in owl_factor_set_rate()