Lines Matching refs:sg

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