Lines Matching full:sclk

34 	struct clkgate_separated *sclk;  in clkgate_separated_enable()  local
38 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_enable()
39 if (sclk->lock) in clkgate_separated_enable()
40 spin_lock_irqsave(sclk->lock, flags); in clkgate_separated_enable()
41 reg = BIT(sclk->bit_idx); in clkgate_separated_enable()
42 writel_relaxed(reg, sclk->enable); in clkgate_separated_enable()
43 readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_enable()
44 if (sclk->lock) in clkgate_separated_enable()
45 spin_unlock_irqrestore(sclk->lock, flags); in clkgate_separated_enable()
51 struct clkgate_separated *sclk; in clkgate_separated_disable() local
55 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_disable()
56 if (sclk->lock) in clkgate_separated_disable()
57 spin_lock_irqsave(sclk->lock, flags); in clkgate_separated_disable()
58 reg = BIT(sclk->bit_idx); in clkgate_separated_disable()
59 writel_relaxed(reg, sclk->enable + CLKGATE_SEPERATED_DISABLE); in clkgate_separated_disable()
60 readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_disable()
61 if (sclk->lock) in clkgate_separated_disable()
62 spin_unlock_irqrestore(sclk->lock, flags); in clkgate_separated_disable()
67 struct clkgate_separated *sclk; in clkgate_separated_is_enabled() local
70 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_is_enabled()
71 reg = readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_is_enabled()
72 reg &= BIT(sclk->bit_idx); in clkgate_separated_is_enabled()
89 struct clkgate_separated *sclk; in hisi_register_clkgate_sep() local
93 sclk = kzalloc(sizeof(*sclk), GFP_KERNEL); in hisi_register_clkgate_sep()
94 if (!sclk) in hisi_register_clkgate_sep()
103 sclk->enable = reg + CLKGATE_SEPERATED_ENABLE; in hisi_register_clkgate_sep()
104 sclk->bit_idx = bit_idx; in hisi_register_clkgate_sep()
105 sclk->flags = clk_gate_flags; in hisi_register_clkgate_sep()
106 sclk->hw.init = &init; in hisi_register_clkgate_sep()
107 sclk->lock = lock; in hisi_register_clkgate_sep()
109 clk = clk_register(dev, &sclk->hw); in hisi_register_clkgate_sep()
111 kfree(sclk); in hisi_register_clkgate_sep()