Lines Matching refs:divider
25 struct clk_divider *divider = to_clk_divider(hw); in clk_half_divider_recalc_rate() local
28 val = readl(divider->reg) >> divider->shift; in clk_half_divider_recalc_rate()
29 val &= div_mask(divider->width); in clk_half_divider_recalc_rate()
98 struct clk_divider *divider = to_clk_divider(hw); in clk_half_divider_round_rate() local
102 divider->width, in clk_half_divider_round_rate()
103 divider->flags); in clk_half_divider_round_rate()
111 struct clk_divider *divider = to_clk_divider(hw); in clk_half_divider_set_rate() local
118 value = min_t(unsigned int, value, div_mask(divider->width)); in clk_half_divider_set_rate()
120 if (divider->lock) in clk_half_divider_set_rate()
121 spin_lock_irqsave(divider->lock, flags); in clk_half_divider_set_rate()
123 __acquire(divider->lock); in clk_half_divider_set_rate()
125 if (divider->flags & CLK_DIVIDER_HIWORD_MASK) { in clk_half_divider_set_rate()
126 val = div_mask(divider->width) << (divider->shift + 16); in clk_half_divider_set_rate()
128 val = readl(divider->reg); in clk_half_divider_set_rate()
129 val &= ~(div_mask(divider->width) << divider->shift); in clk_half_divider_set_rate()
131 val |= value << divider->shift; in clk_half_divider_set_rate()
132 writel(val, divider->reg); in clk_half_divider_set_rate()
134 if (divider->lock) in clk_half_divider_set_rate()
135 spin_unlock_irqrestore(divider->lock, flags); in clk_half_divider_set_rate()
137 __release(divider->lock); in clk_half_divider_set_rate()