Lines Matching refs:mux
156 struct clk_mux *mux = to_clk_mux(hw); in imx93_clk_composite_mux_set_parent() local
157 u32 val = clk_mux_index_to_val(mux->table, mux->flags, index); in imx93_clk_composite_mux_set_parent()
162 if (mux->lock) in imx93_clk_composite_mux_set_parent()
163 spin_lock_irqsave(mux->lock, flags); in imx93_clk_composite_mux_set_parent()
165 reg = readl(mux->reg); in imx93_clk_composite_mux_set_parent()
166 reg &= ~(mux->mask << mux->shift); in imx93_clk_composite_mux_set_parent()
167 val = val << mux->shift; in imx93_clk_composite_mux_set_parent()
169 writel(reg, mux->reg); in imx93_clk_composite_mux_set_parent()
171 ret = imx93_clk_composite_wait_ready(hw, mux->reg); in imx93_clk_composite_mux_set_parent()
173 if (mux->lock) in imx93_clk_composite_mux_set_parent()
174 spin_unlock_irqrestore(mux->lock, flags); in imx93_clk_composite_mux_set_parent()
199 struct clk_mux *mux = NULL; in imx93_clk_composite_flags() local
203 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in imx93_clk_composite_flags()
204 if (!mux) in imx93_clk_composite_flags()
207 mux_hw = &mux->hw; in imx93_clk_composite_flags()
208 mux->reg = reg; in imx93_clk_composite_flags()
209 mux->shift = CCM_MUX_SHIFT; in imx93_clk_composite_flags()
210 mux->mask = CCM_MUX_MASK; in imx93_clk_composite_flags()
211 mux->lock = &imx_ccm_lock; in imx93_clk_composite_flags()
258 kfree(mux); in imx93_clk_composite_flags()