Lines Matching full:mux

23 static void __krait_mux_set_sel(struct krait_mux_clk *mux, int sel)  in __krait_mux_set_sel()  argument
30 regval = krait_get_l2_indirect_reg(mux->offset); in __krait_mux_set_sel()
33 if (mux->disable_sec_src_gating) { in __krait_mux_set_sel()
35 krait_set_l2_indirect_reg(mux->offset, regval); in __krait_mux_set_sel()
38 regval &= ~(mux->mask << mux->shift); in __krait_mux_set_sel()
39 regval |= (sel & mux->mask) << mux->shift; in __krait_mux_set_sel()
40 if (mux->lpl) { in __krait_mux_set_sel()
41 regval &= ~(mux->mask << (mux->shift + LPL_SHIFT)); in __krait_mux_set_sel()
42 regval |= (sel & mux->mask) << (mux->shift + LPL_SHIFT); in __krait_mux_set_sel()
44 krait_set_l2_indirect_reg(mux->offset, regval); in __krait_mux_set_sel()
47 if (mux->disable_sec_src_gating) { in __krait_mux_set_sel()
49 krait_set_l2_indirect_reg(mux->offset, regval); in __krait_mux_set_sel()
57 * Unlock now to make sure the mux register is not in __krait_mux_set_sel()
65 struct krait_mux_clk *mux = to_krait_mux_clk(hw); in krait_mux_set_parent() local
68 sel = clk_mux_index_to_val(mux->parent_map, 0, index); in krait_mux_set_parent()
69 mux->en_mask = sel; in krait_mux_set_parent()
70 /* Don't touch mux if CPU is off as it won't work */ in krait_mux_set_parent()
72 __krait_mux_set_sel(mux, sel); in krait_mux_set_parent()
74 mux->reparent = true; in krait_mux_set_parent()
81 struct krait_mux_clk *mux = to_krait_mux_clk(hw); in krait_mux_get_parent() local
84 sel = krait_get_l2_indirect_reg(mux->offset); in krait_mux_get_parent()
85 sel >>= mux->shift; in krait_mux_get_parent()
86 sel &= mux->mask; in krait_mux_get_parent()
87 mux->en_mask = sel; in krait_mux_get_parent()
89 return clk_mux_val_to_index(hw, mux->parent_map, 0, sel); in krait_mux_get_parent()