Lines Matching defs:cm

38 	struct ccu_mult *cm = data;
41 _cm.min = cm->mult.min;
43 if (cm->mult.max)
44 _cm.max = cm->mult.max;
46 _cm.max = (1 << cm->mult.width) + cm->mult.offset - 1;
55 struct ccu_mult *cm = hw_to_ccu_mult(hw);
57 return ccu_gate_helper_disable(&cm->common, cm->enable);
62 struct ccu_mult *cm = hw_to_ccu_mult(hw);
64 return ccu_gate_helper_enable(&cm->common, cm->enable);
69 struct ccu_mult *cm = hw_to_ccu_mult(hw);
71 return ccu_gate_helper_is_enabled(&cm->common, cm->enable);
77 struct ccu_mult *cm = hw_to_ccu_mult(hw);
81 if (ccu_frac_helper_is_enabled(&cm->common, &cm->frac))
82 return ccu_frac_helper_read_rate(&cm->common, &cm->frac);
84 reg = readl(cm->common.base + cm->common.reg);
85 val = reg >> cm->mult.shift;
86 val &= (1 << cm->mult.width) - 1;
88 parent_rate = ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
91 return parent_rate * (val + cm->mult.offset);
97 struct ccu_mult *cm = hw_to_ccu_mult(hw);
99 return ccu_mux_helper_determine_rate(&cm->common, &cm->mux,
100 req, ccu_mult_round_rate, cm);
106 struct ccu_mult *cm = hw_to_ccu_mult(hw);
111 if (ccu_frac_helper_has_rate(&cm->common, &cm->frac, rate)) {
112 ccu_frac_helper_enable(&cm->common, &cm->frac);
114 return ccu_frac_helper_set_rate(&cm->common, &cm->frac,
115 rate, cm->lock);
117 ccu_frac_helper_disable(&cm->common, &cm->frac);
120 parent_rate = ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
123 _cm.min = cm->mult.min;
125 if (cm->mult.max)
126 _cm.max = cm->mult.max;
128 _cm.max = (1 << cm->mult.width) + cm->mult.offset - 1;
132 spin_lock_irqsave(cm->common.lock, flags);
134 reg = readl(cm->common.base + cm->common.reg);
135 reg &= ~GENMASK(cm->mult.width + cm->mult.shift - 1, cm->mult.shift);
136 reg |= ((_cm.mult - cm->mult.offset) << cm->mult.shift);
138 writel(reg, cm->common.base + cm->common.reg);
140 spin_unlock_irqrestore(cm->common.lock, flags);
142 ccu_helper_wait_for_lock(&cm->common, cm->lock);
149 struct ccu_mult *cm = hw_to_ccu_mult(hw);
151 return ccu_mux_helper_get_parent(&cm->common, &cm->mux);
156 struct ccu_mult *cm = hw_to_ccu_mult(hw);
158 return ccu_mux_helper_set_parent(&cm->common, &cm->mux, index);