Lines Matching refs:gate
137 const struct stm32_gate_cfg *gate = &data->gates[gate_id]; in stm32_gate_endisable() local
138 void __iomem *addr = base + gate->offset; in stm32_gate_endisable()
144 if (gate->set_clr != 0) in stm32_gate_endisable()
145 writel(BIT(gate->bit_idx), addr); in stm32_gate_endisable()
147 writel(readl(addr) | BIT(gate->bit_idx), addr); in stm32_gate_endisable()
152 if (gate->set_clr != 0) in stm32_gate_endisable()
153 writel(BIT(gate->bit_idx), addr + gate->set_clr); in stm32_gate_endisable()
155 writel(readl(addr) & ~BIT(gate->bit_idx), addr); in stm32_gate_endisable()
163 const struct stm32_gate_cfg *gate = &data->gates[gate_id]; in stm32_gate_disable_unused() local
164 void __iomem *addr = base + gate->offset; in stm32_gate_disable_unused()
169 if (gate->set_clr != 0) in stm32_gate_disable_unused()
170 writel(BIT(gate->bit_idx), addr + gate->set_clr); in stm32_gate_disable_unused()
172 writel(readl(addr) & ~BIT(gate->bit_idx), addr); in stm32_gate_disable_unused()
179 const struct stm32_gate_cfg *gate = &data->gates[gate_id]; in stm32_gate_is_enabled() local
181 return (readl(base + gate->offset) & BIT(gate->bit_idx)) != 0; in stm32_gate_is_enabled()
287 struct clk_stm32_gate *gate = to_clk_stm32_gate(hw); in clk_stm32_gate_endisable() local
290 spin_lock_irqsave(gate->lock, flags); in clk_stm32_gate_endisable()
292 stm32_gate_endisable(gate->base, gate->clock_data, gate->gate_id, enable); in clk_stm32_gate_endisable()
294 spin_unlock_irqrestore(gate->lock, flags); in clk_stm32_gate_endisable()
311 struct clk_stm32_gate *gate = to_clk_stm32_gate(hw); in clk_stm32_gate_is_enabled() local
313 return stm32_gate_is_enabled(gate->base, gate->clock_data, gate->gate_id); in clk_stm32_gate_is_enabled()
318 struct clk_stm32_gate *gate = to_clk_stm32_gate(hw); in clk_stm32_gate_disable_unused() local
321 spin_lock_irqsave(gate->lock, flags); in clk_stm32_gate_disable_unused()
323 stm32_gate_disable_unused(gate->base, gate->clock_data, gate->gate_id); in clk_stm32_gate_disable_unused()
325 spin_unlock_irqrestore(gate->lock, flags); in clk_stm32_gate_disable_unused()
653 struct clk_stm32_gate *gate = cfg->clock_cfg; in clk_stm32_gate_register() local
654 struct clk_hw *hw = &gate->hw; in clk_stm32_gate_register()
657 gate->base = base; in clk_stm32_gate_register()
658 gate->lock = lock; in clk_stm32_gate_register()
659 gate->clock_data = data->clock_data; in clk_stm32_gate_register()