Lines Matching refs:sg
13 static void clk_gate_toggle(const struct sprd_gate *sg, bool en)
15 const struct sprd_clk_common *common = &sg->common;
17 bool set = sg->flags & CLK_GATE_SET_TO_DISABLE ? true : false;
24 reg |= sg->enable_mask;
26 reg &= ~sg->enable_mask;
31 static void clk_sc_gate_toggle(const struct sprd_gate *sg, bool en)
33 const struct sprd_clk_common *common = &sg->common;
34 bool set = sg->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0;
45 offset = set ? sg->sc_offset : sg->sc_offset * 2;
48 sg->enable_mask);
53 struct sprd_gate *sg = hw_to_sprd_gate(hw);
55 clk_gate_toggle(sg, false);
60 struct sprd_gate *sg = hw_to_sprd_gate(hw);
62 clk_gate_toggle(sg, true);
69 struct sprd_gate *sg = hw_to_sprd_gate(hw);
71 clk_sc_gate_toggle(sg, false);
76 struct sprd_gate *sg = hw_to_sprd_gate(hw);
78 clk_sc_gate_toggle(sg, true);
85 struct sprd_gate *sg = hw_to_sprd_gate(hw);
87 clk_sc_gate_toggle(sg, true);
88 udelay(sg->udelay);
95 struct sprd_gate *sg = hw_to_sprd_gate(hw);
96 struct sprd_clk_common *common = &sg->common;
100 if (sg->flags & SPRD_GATE_NON_AON) {
108 if (sg->flags & CLK_GATE_SET_TO_DISABLE)
109 reg ^= sg->enable_mask;
111 reg &= sg->enable_mask;