Lines Matching refs:cm

18 			      struct ccu_mux_internal *cm,
34 parent_index = reg >> cm->shift;
35 parent_index &= (1 << cm->width) - 1;
41 for (i = 0; i < cm->n_predivs; i++)
42 if (parent_index == cm->fixed_predivs[i].index)
43 prediv = cm->fixed_predivs[i].div;
49 for (i = 0; i < cm->n_var_predivs; i++)
50 if (parent_index == cm->var_predivs[i].index) {
53 div = reg >> cm->var_predivs[i].shift;
54 div &= (1 << cm->var_predivs[i].width) - 1;
63 struct ccu_mux_internal *cm,
67 return parent_rate / ccu_mux_get_prediv(common, cm, parent_index);
72 struct ccu_mux_internal *cm,
76 return parent_rate * ccu_mux_get_prediv(common, cm, parent_index);
80 struct ccu_mux_internal *cm,
98 adj_parent_rate = ccu_mux_helper_apply_prediv(common, cm, -1,
101 best_rate = round(cm, best_parent, &adj_parent_rate,
109 best_parent_rate = ccu_mux_helper_unapply_prediv(common, cm, -1,
123 parent_rate = ccu_mux_helper_apply_prediv(common, cm, i,
126 tmp_rate = round(cm, parent, &parent_rate, req->rate, data);
133 parent_rate = ccu_mux_helper_unapply_prediv(common, cm, i,
161 struct ccu_mux_internal *cm)
167 parent = reg >> cm->shift;
168 parent &= (1 << cm->width) - 1;
170 if (cm->table) {
175 if (cm->table[i] == parent)
184 struct ccu_mux_internal *cm,
190 if (cm->table)
191 index = cm->table[index];
201 reg &= ~GENMASK(cm->width + cm->shift - 1, cm->shift);
202 writel(reg | (index << cm->shift), common->base + common->reg);
212 struct ccu_mux *cm = hw_to_ccu_mux(hw);
214 return ccu_gate_helper_disable(&cm->common, cm->enable);
219 struct ccu_mux *cm = hw_to_ccu_mux(hw);
221 return ccu_gate_helper_enable(&cm->common, cm->enable);
226 struct ccu_mux *cm = hw_to_ccu_mux(hw);
228 return ccu_gate_helper_is_enabled(&cm->common, cm->enable);
233 struct ccu_mux *cm = hw_to_ccu_mux(hw);
235 return ccu_mux_helper_get_parent(&cm->common, &cm->mux);
240 struct ccu_mux *cm = hw_to_ccu_mux(hw);
242 return ccu_mux_helper_set_parent(&cm->common, &cm->mux, index);
248 struct ccu_mux *cm = hw_to_ccu_mux(hw);
250 if (cm->common.features & CCU_FEATURE_CLOSEST_RATE)
259 struct ccu_mux *cm = hw_to_ccu_mux(hw);
261 return ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
292 mux->cm);
293 ret = ccu_mux_helper_set_parent(mux->common, mux->cm,
296 ret = ccu_mux_helper_set_parent(mux->common, mux->cm,