Lines Matching refs:gate
40 struct clk_gate2 *gate = to_clk_gate2(dev_get_clk_ptr(clk->dev)); in clk_gate2_enable() local
43 reg = readl(gate->reg); in clk_gate2_enable()
44 reg &= ~(3 << gate->bit_idx); in clk_gate2_enable()
45 reg |= gate->cgr_val << gate->bit_idx; in clk_gate2_enable()
46 writel(reg, gate->reg); in clk_gate2_enable()
53 struct clk_gate2 *gate = to_clk_gate2(dev_get_clk_ptr(clk->dev)); in clk_gate2_disable() local
56 reg = readl(gate->reg); in clk_gate2_disable()
57 reg &= ~(3 << gate->bit_idx); in clk_gate2_disable()
58 writel(reg, gate->reg); in clk_gate2_disable()
85 struct clk_gate2 *gate; in clk_register_gate2() local
89 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in clk_register_gate2()
90 if (!gate) in clk_register_gate2()
93 gate->reg = reg; in clk_register_gate2()
94 gate->bit_idx = bit_idx; in clk_register_gate2()
95 gate->cgr_val = cgr_val; in clk_register_gate2()
96 gate->flags = clk_gate2_flags; in clk_register_gate2()
98 clk = &gate->clk; in clk_register_gate2()
102 kfree(gate); in clk_register_gate2()