nkm                20 drivers/clk/sunxi-ng/ccu_nkm.c 			      struct _ccu_nkm *nkm)
nkm                26 drivers/clk/sunxi-ng/ccu_nkm.c 	for (_k = nkm->min_k; _k <= nkm->max_k; _k++) {
nkm                27 drivers/clk/sunxi-ng/ccu_nkm.c 		for (_n = nkm->min_n; _n <= nkm->max_n; _n++) {
nkm                28 drivers/clk/sunxi-ng/ccu_nkm.c 			for (_m = nkm->min_m; _m <= nkm->max_m; _m++) {
nkm                45 drivers/clk/sunxi-ng/ccu_nkm.c 	nkm->n = best_n;
nkm                46 drivers/clk/sunxi-ng/ccu_nkm.c 	nkm->k = best_k;
nkm                47 drivers/clk/sunxi-ng/ccu_nkm.c 	nkm->m = best_m;
nkm                52 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm                54 drivers/clk/sunxi-ng/ccu_nkm.c 	return ccu_gate_helper_disable(&nkm->common, nkm->enable);
nkm                59 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm                61 drivers/clk/sunxi-ng/ccu_nkm.c 	return ccu_gate_helper_enable(&nkm->common, nkm->enable);
nkm                66 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm                68 drivers/clk/sunxi-ng/ccu_nkm.c 	return ccu_gate_helper_is_enabled(&nkm->common, nkm->enable);
nkm                74 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm                78 drivers/clk/sunxi-ng/ccu_nkm.c 	reg = readl(nkm->common.base + nkm->common.reg);
nkm                80 drivers/clk/sunxi-ng/ccu_nkm.c 	n = reg >> nkm->n.shift;
nkm                81 drivers/clk/sunxi-ng/ccu_nkm.c 	n &= (1 << nkm->n.width) - 1;
nkm                82 drivers/clk/sunxi-ng/ccu_nkm.c 	n += nkm->n.offset;
nkm                86 drivers/clk/sunxi-ng/ccu_nkm.c 	k = reg >> nkm->k.shift;
nkm                87 drivers/clk/sunxi-ng/ccu_nkm.c 	k &= (1 << nkm->k.width) - 1;
nkm                88 drivers/clk/sunxi-ng/ccu_nkm.c 	k += nkm->k.offset;
nkm                92 drivers/clk/sunxi-ng/ccu_nkm.c 	m = reg >> nkm->m.shift;
nkm                93 drivers/clk/sunxi-ng/ccu_nkm.c 	m &= (1 << nkm->m.width) - 1;
nkm                94 drivers/clk/sunxi-ng/ccu_nkm.c 	m += nkm->m.offset;
nkm               100 drivers/clk/sunxi-ng/ccu_nkm.c 	if (nkm->common.features & CCU_FEATURE_FIXED_POSTDIV)
nkm               101 drivers/clk/sunxi-ng/ccu_nkm.c 		rate /= nkm->fixed_post_div;
nkm               112 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = data;
nkm               115 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.min_n = nkm->n.min ?: 1;
nkm               116 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.max_n = nkm->n.max ?: 1 << nkm->n.width;
nkm               117 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.min_k = nkm->k.min ?: 1;
nkm               118 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.max_k = nkm->k.max ?: 1 << nkm->k.width;
nkm               120 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.max_m = nkm->m.max ?: 1 << nkm->m.width;
nkm               122 drivers/clk/sunxi-ng/ccu_nkm.c 	if (nkm->common.features & CCU_FEATURE_FIXED_POSTDIV)
nkm               123 drivers/clk/sunxi-ng/ccu_nkm.c 		rate *= nkm->fixed_post_div;
nkm               129 drivers/clk/sunxi-ng/ccu_nkm.c 	if (nkm->common.features & CCU_FEATURE_FIXED_POSTDIV)
nkm               130 drivers/clk/sunxi-ng/ccu_nkm.c 		rate /= nkm->fixed_post_div;
nkm               138 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm               140 drivers/clk/sunxi-ng/ccu_nkm.c 	return ccu_mux_helper_determine_rate(&nkm->common, &nkm->mux,
nkm               141 drivers/clk/sunxi-ng/ccu_nkm.c 					     req, ccu_nkm_round_rate, nkm);
nkm               147 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm               152 drivers/clk/sunxi-ng/ccu_nkm.c 	if (nkm->common.features & CCU_FEATURE_FIXED_POSTDIV)
nkm               153 drivers/clk/sunxi-ng/ccu_nkm.c 		rate *= nkm->fixed_post_div;
nkm               155 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.min_n = nkm->n.min ?: 1;
nkm               156 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.max_n = nkm->n.max ?: 1 << nkm->n.width;
nkm               157 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.min_k = nkm->k.min ?: 1;
nkm               158 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.max_k = nkm->k.max ?: 1 << nkm->k.width;
nkm               160 drivers/clk/sunxi-ng/ccu_nkm.c 	_nkm.max_m = nkm->m.max ?: 1 << nkm->m.width;
nkm               164 drivers/clk/sunxi-ng/ccu_nkm.c 	spin_lock_irqsave(nkm->common.lock, flags);
nkm               166 drivers/clk/sunxi-ng/ccu_nkm.c 	reg = readl(nkm->common.base + nkm->common.reg);
nkm               167 drivers/clk/sunxi-ng/ccu_nkm.c 	reg &= ~GENMASK(nkm->n.width + nkm->n.shift - 1, nkm->n.shift);
nkm               168 drivers/clk/sunxi-ng/ccu_nkm.c 	reg &= ~GENMASK(nkm->k.width + nkm->k.shift - 1, nkm->k.shift);
nkm               169 drivers/clk/sunxi-ng/ccu_nkm.c 	reg &= ~GENMASK(nkm->m.width + nkm->m.shift - 1, nkm->m.shift);
nkm               171 drivers/clk/sunxi-ng/ccu_nkm.c 	reg |= (_nkm.n - nkm->n.offset) << nkm->n.shift;
nkm               172 drivers/clk/sunxi-ng/ccu_nkm.c 	reg |= (_nkm.k - nkm->k.offset) << nkm->k.shift;
nkm               173 drivers/clk/sunxi-ng/ccu_nkm.c 	reg |= (_nkm.m - nkm->m.offset) << nkm->m.shift;
nkm               174 drivers/clk/sunxi-ng/ccu_nkm.c 	writel(reg, nkm->common.base + nkm->common.reg);
nkm               176 drivers/clk/sunxi-ng/ccu_nkm.c 	spin_unlock_irqrestore(nkm->common.lock, flags);
nkm               178 drivers/clk/sunxi-ng/ccu_nkm.c 	ccu_helper_wait_for_lock(&nkm->common, nkm->lock);
nkm               185 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm               187 drivers/clk/sunxi-ng/ccu_nkm.c 	return ccu_mux_helper_get_parent(&nkm->common, &nkm->mux);
nkm               192 drivers/clk/sunxi-ng/ccu_nkm.c 	struct ccu_nkm *nkm = hw_to_ccu_nkm(hw);
nkm               194 drivers/clk/sunxi-ng/ccu_nkm.c 	return ccu_mux_helper_set_parent(&nkm->common, &nkm->mux, index);