Lines Matching refs:mult
17 static unsigned long __get_mult(struct clk_multiplier *mult, in __get_mult() argument
21 if (mult->flags & CLK_MULTIPLIER_ROUND_CLOSEST) in __get_mult()
30 struct clk_multiplier *mult = to_clk_multiplier(hw); in clk_multiplier_recalc_rate() local
33 val = clk_readl(mult->reg) >> mult->shift; in clk_multiplier_recalc_rate()
34 val &= GENMASK(mult->width - 1, 0); in clk_multiplier_recalc_rate()
36 if (!val && mult->flags & CLK_MULTIPLIER_ZERO_BYPASS) in clk_multiplier_recalc_rate()
55 struct clk_multiplier *mult = to_clk_multiplier(hw); in __bestmult() local
66 !(mult->flags & CLK_MULTIPLIER_ZERO_BYPASS)) in __bestmult()
104 struct clk_multiplier *mult = to_clk_multiplier(hw); in clk_multiplier_round_rate() local
106 mult->width, mult->flags); in clk_multiplier_round_rate()
114 struct clk_multiplier *mult = to_clk_multiplier(hw); in clk_multiplier_set_rate() local
115 unsigned long factor = __get_mult(mult, rate, parent_rate); in clk_multiplier_set_rate()
119 if (mult->lock) in clk_multiplier_set_rate()
120 spin_lock_irqsave(mult->lock, flags); in clk_multiplier_set_rate()
122 __acquire(mult->lock); in clk_multiplier_set_rate()
124 val = clk_readl(mult->reg); in clk_multiplier_set_rate()
125 val &= ~GENMASK(mult->width + mult->shift - 1, mult->shift); in clk_multiplier_set_rate()
126 val |= factor << mult->shift; in clk_multiplier_set_rate()
127 clk_writel(val, mult->reg); in clk_multiplier_set_rate()
129 if (mult->lock) in clk_multiplier_set_rate()
130 spin_unlock_irqrestore(mult->lock, flags); in clk_multiplier_set_rate()
132 __release(mult->lock); in clk_multiplier_set_rate()