Lines Matching refs:cm

16 			      struct ccu_mux_internal *cm,
32 parent_index = reg >> cm->shift;
33 parent_index &= (1 << cm->width) - 1;
39 for (i = 0; i < cm->n_predivs; i++)
40 if (parent_index == cm->fixed_predivs[i].index)
41 prediv = cm->fixed_predivs[i].div;
47 for (i = 0; i < cm->n_var_predivs; i++)
48 if (parent_index == cm->var_predivs[i].index) {
51 div = reg >> cm->var_predivs[i].shift;
52 div &= (1 << cm->var_predivs[i].width) - 1;
61 struct ccu_mux_internal *cm,
65 return parent_rate / ccu_mux_get_prediv(common, cm, parent_index);
69 struct ccu_mux_internal *cm,
73 return parent_rate * ccu_mux_get_prediv(common, cm, parent_index);
77 struct ccu_mux_internal *cm,
95 adj_parent_rate = ccu_mux_helper_apply_prediv(common, cm, -1,
98 best_rate = round(cm, best_parent, &adj_parent_rate,
106 best_parent_rate = ccu_mux_helper_unapply_prediv(common, cm, -1,
120 parent_rate = ccu_mux_helper_apply_prediv(common, cm, i,
123 tmp_rate = round(cm, parent, &parent_rate, req->rate, data);
130 parent_rate = ccu_mux_helper_unapply_prediv(common, cm, i,
157 struct ccu_mux_internal *cm)
163 parent = reg >> cm->shift;
164 parent &= (1 << cm->width) - 1;
166 if (cm->table) {
171 if (cm->table[i] == parent)
179 struct ccu_mux_internal *cm,
185 if (cm->table)
186 index = cm->table[index];
191 reg &= ~GENMASK(cm->width + cm->shift - 1, cm->shift);
192 writel(reg | (index << cm->shift), common->base + common->reg);
201 struct ccu_mux *cm = hw_to_ccu_mux(hw);
203 return ccu_gate_helper_disable(&cm->common, cm->enable);
208 struct ccu_mux *cm = hw_to_ccu_mux(hw);
210 return ccu_gate_helper_enable(&cm->common, cm->enable);
215 struct ccu_mux *cm = hw_to_ccu_mux(hw);
217 return ccu_gate_helper_is_enabled(&cm->common, cm->enable);
222 struct ccu_mux *cm = hw_to_ccu_mux(hw);
224 return ccu_mux_helper_get_parent(&cm->common, &cm->mux);
229 struct ccu_mux *cm = hw_to_ccu_mux(hw);
231 return ccu_mux_helper_set_parent(&cm->common, &cm->mux, index);
237 struct ccu_mux *cm = hw_to_ccu_mux(hw);
239 return ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
269 mux->cm);
270 ret = ccu_mux_helper_set_parent(mux->common, mux->cm,
273 ret = ccu_mux_helper_set_parent(mux->common, mux->cm,