Lines Matching refs:div
21 struct clk_divider *div = to_clk_divider(hw); in to_clk_divider_gate() local
23 return container_of(div, struct clk_divider_gate, divider); in to_clk_divider_gate()
29 struct clk_divider *div = to_clk_divider(hw); in clk_divider_gate_recalc_rate_ro() local
32 val = readl(div->reg) >> div->shift; in clk_divider_gate_recalc_rate_ro()
33 val &= clk_div_mask(div->width); in clk_divider_gate_recalc_rate_ro()
37 return divider_recalc_rate(hw, parent_rate, val, div->table, in clk_divider_gate_recalc_rate_ro()
38 div->flags, div->width); in clk_divider_gate_recalc_rate_ro()
45 struct clk_divider *div = to_clk_divider(hw); in clk_divider_gate_recalc_rate() local
49 spin_lock_irqsave(div->lock, flags); in clk_divider_gate_recalc_rate()
54 val = readl(div->reg) >> div->shift; in clk_divider_gate_recalc_rate()
55 val &= clk_div_mask(div->width); in clk_divider_gate_recalc_rate()
58 spin_unlock_irqrestore(div->lock, flags); in clk_divider_gate_recalc_rate()
63 return divider_recalc_rate(hw, parent_rate, val, div->table, in clk_divider_gate_recalc_rate()
64 div->flags, div->width); in clk_divider_gate_recalc_rate()
77 struct clk_divider *div = to_clk_divider(hw); in clk_divider_gate_set_rate() local
82 value = divider_get_val(rate, parent_rate, div->table, in clk_divider_gate_set_rate()
83 div->width, div->flags); in clk_divider_gate_set_rate()
87 spin_lock_irqsave(div->lock, flags); in clk_divider_gate_set_rate()
90 val = readl(div->reg); in clk_divider_gate_set_rate()
91 val &= ~(clk_div_mask(div->width) << div->shift); in clk_divider_gate_set_rate()
92 val |= (u32)value << div->shift; in clk_divider_gate_set_rate()
93 writel(val, div->reg); in clk_divider_gate_set_rate()
98 spin_unlock_irqrestore(div->lock, flags); in clk_divider_gate_set_rate()
106 struct clk_divider *div = to_clk_divider(hw); in clk_divider_enable() local
115 spin_lock_irqsave(div->lock, flags); in clk_divider_enable()
117 val = readl(div->reg); in clk_divider_enable()
118 val |= div_gate->cached_val << div->shift; in clk_divider_enable()
119 writel(val, div->reg); in clk_divider_enable()
121 spin_unlock_irqrestore(div->lock, flags); in clk_divider_enable()
129 struct clk_divider *div = to_clk_divider(hw); in clk_divider_disable() local
133 spin_lock_irqsave(div->lock, flags); in clk_divider_disable()
136 val = readl(div->reg) >> div->shift; in clk_divider_disable()
137 val &= clk_div_mask(div->width); in clk_divider_disable()
139 writel(0, div->reg); in clk_divider_disable()
141 spin_unlock_irqrestore(div->lock, flags); in clk_divider_disable()
146 struct clk_divider *div = to_clk_divider(hw); in clk_divider_is_enabled() local
149 val = readl(div->reg) >> div->shift; in clk_divider_is_enabled()
150 val &= clk_div_mask(div->width); in clk_divider_is_enabled()