Lines Matching refs:gate
386 const struct mtk_gate *gate = &priv->gates[clk->id]; in mtk_clk_gate_enable() local
387 u32 bit = BIT(gate->shift); in mtk_clk_gate_enable()
389 switch (gate->flags & CLK_GATE_MASK) { in mtk_clk_gate_enable()
391 writel(bit, priv->base + gate->regs->clr_ofs); in mtk_clk_gate_enable()
394 writel(bit, priv->base + gate->regs->set_ofs); in mtk_clk_gate_enable()
397 clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, 0); in mtk_clk_gate_enable()
400 clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, bit); in mtk_clk_gate_enable()
413 const struct mtk_gate *gate = &priv->gates[clk->id]; in mtk_clk_gate_disable() local
414 u32 bit = BIT(gate->shift); in mtk_clk_gate_disable()
416 switch (gate->flags & CLK_GATE_MASK) { in mtk_clk_gate_disable()
418 writel(bit, priv->base + gate->regs->set_ofs); in mtk_clk_gate_disable()
421 writel(bit, priv->base + gate->regs->clr_ofs); in mtk_clk_gate_disable()
424 clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, bit); in mtk_clk_gate_disable()
427 clrsetbits_le32(priv->base + gate->regs->sta_ofs, bit, 0); in mtk_clk_gate_disable()
440 const struct mtk_gate *gate = &priv->gates[clk->id]; in mtk_clk_gate_get_rate() local
442 switch (gate->flags & CLK_PARENT_MASK) { in mtk_clk_gate_get_rate()
444 return mtk_clk_find_parent_rate(clk, gate->parent, in mtk_clk_gate_get_rate()
448 return mtk_clk_find_parent_rate(clk, gate->parent, in mtk_clk_gate_get_rate()