Lines Matching refs:divider
24 struct clk_divider *divider = to_clk_divider(hw); in clk_half_divider_recalc_rate() local
27 val = clk_readl(divider->reg) >> divider->shift; in clk_half_divider_recalc_rate()
28 val &= div_mask(divider->width); in clk_half_divider_recalc_rate()
97 struct clk_divider *divider = to_clk_divider(hw); in clk_half_divider_round_rate() local
101 divider->width, in clk_half_divider_round_rate()
102 divider->flags); in clk_half_divider_round_rate()
110 struct clk_divider *divider = to_clk_divider(hw); in clk_half_divider_set_rate() local
117 value = min_t(unsigned int, value, div_mask(divider->width)); in clk_half_divider_set_rate()
119 if (divider->lock) in clk_half_divider_set_rate()
120 spin_lock_irqsave(divider->lock, flags); in clk_half_divider_set_rate()
122 __acquire(divider->lock); in clk_half_divider_set_rate()
124 if (divider->flags & CLK_DIVIDER_HIWORD_MASK) { in clk_half_divider_set_rate()
125 val = div_mask(divider->width) << (divider->shift + 16); in clk_half_divider_set_rate()
127 val = clk_readl(divider->reg); in clk_half_divider_set_rate()
128 val &= ~(div_mask(divider->width) << divider->shift); in clk_half_divider_set_rate()
130 val |= value << divider->shift; in clk_half_divider_set_rate()
131 clk_writel(val, divider->reg); in clk_half_divider_set_rate()
133 if (divider->lock) in clk_half_divider_set_rate()
134 spin_unlock_irqrestore(divider->lock, flags); in clk_half_divider_set_rate()
136 __release(divider->lock); in clk_half_divider_set_rate()