Lines Matching full:mult
15 static inline u32 clk_mult_readl(struct clk_multiplier *mult) in clk_mult_readl() argument
17 if (mult->flags & CLK_MULTIPLIER_BIG_ENDIAN) in clk_mult_readl()
18 return ioread32be(mult->reg); in clk_mult_readl()
20 return readl(mult->reg); in clk_mult_readl()
23 static inline void clk_mult_writel(struct clk_multiplier *mult, u32 val) in clk_mult_writel() argument
25 if (mult->flags & CLK_MULTIPLIER_BIG_ENDIAN) in clk_mult_writel()
26 iowrite32be(val, mult->reg); in clk_mult_writel()
28 writel(val, mult->reg); in clk_mult_writel()
31 static unsigned long __get_mult(struct clk_multiplier *mult, in __get_mult() argument
35 if (mult->flags & CLK_MULTIPLIER_ROUND_CLOSEST) in __get_mult()
44 struct clk_multiplier *mult = to_clk_multiplier(hw); in clk_multiplier_recalc_rate() local
47 val = clk_mult_readl(mult) >> mult->shift; in clk_multiplier_recalc_rate()
48 val &= GENMASK(mult->width - 1, 0); in clk_multiplier_recalc_rate()
50 if (!val && mult->flags & CLK_MULTIPLIER_ZERO_BYPASS) in clk_multiplier_recalc_rate()
69 struct clk_multiplier *mult = to_clk_multiplier(hw); in __bestmult() local
80 !(mult->flags & CLK_MULTIPLIER_ZERO_BYPASS)) in __bestmult()
118 struct clk_multiplier *mult = to_clk_multiplier(hw); in clk_multiplier_round_rate() local
120 mult->width, mult->flags); in clk_multiplier_round_rate()
128 struct clk_multiplier *mult = to_clk_multiplier(hw); in clk_multiplier_set_rate() local
129 unsigned long factor = __get_mult(mult, rate, parent_rate); in clk_multiplier_set_rate()
133 if (mult->lock) in clk_multiplier_set_rate()
134 spin_lock_irqsave(mult->lock, flags); in clk_multiplier_set_rate()
136 __acquire(mult->lock); in clk_multiplier_set_rate()
138 val = clk_mult_readl(mult); in clk_multiplier_set_rate()
139 val &= ~GENMASK(mult->width + mult->shift - 1, mult->shift); in clk_multiplier_set_rate()
140 val |= factor << mult->shift; in clk_multiplier_set_rate()
141 clk_mult_writel(mult, val); in clk_multiplier_set_rate()
143 if (mult->lock) in clk_multiplier_set_rate()
144 spin_unlock_irqrestore(mult->lock, flags); in clk_multiplier_set_rate()
146 __release(mult->lock); in clk_multiplier_set_rate()