Lines Matching refs:sclk
48 struct clkgate_separated *sclk; in clkgate_separated_enable() local
52 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_enable()
53 if (sclk->lock) in clkgate_separated_enable()
54 spin_lock_irqsave(sclk->lock, flags); in clkgate_separated_enable()
55 reg = BIT(sclk->bit_idx); in clkgate_separated_enable()
56 writel_relaxed(reg, sclk->enable); in clkgate_separated_enable()
57 readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_enable()
58 if (sclk->lock) in clkgate_separated_enable()
59 spin_unlock_irqrestore(sclk->lock, flags); in clkgate_separated_enable()
65 struct clkgate_separated *sclk; in clkgate_separated_disable() local
69 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_disable()
70 if (sclk->lock) in clkgate_separated_disable()
71 spin_lock_irqsave(sclk->lock, flags); in clkgate_separated_disable()
72 reg = BIT(sclk->bit_idx); in clkgate_separated_disable()
73 writel_relaxed(reg, sclk->enable + CLKGATE_SEPERATED_DISABLE); in clkgate_separated_disable()
74 readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_disable()
75 if (sclk->lock) in clkgate_separated_disable()
76 spin_unlock_irqrestore(sclk->lock, flags); in clkgate_separated_disable()
81 struct clkgate_separated *sclk; in clkgate_separated_is_enabled() local
84 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_is_enabled()
85 reg = readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_is_enabled()
86 reg &= BIT(sclk->bit_idx); in clkgate_separated_is_enabled()
103 struct clkgate_separated *sclk; in hisi_register_clkgate_sep() local
107 sclk = kzalloc(sizeof(*sclk), GFP_KERNEL); in hisi_register_clkgate_sep()
108 if (!sclk) { in hisi_register_clkgate_sep()
119 sclk->enable = reg + CLKGATE_SEPERATED_ENABLE; in hisi_register_clkgate_sep()
120 sclk->bit_idx = bit_idx; in hisi_register_clkgate_sep()
121 sclk->flags = clk_gate_flags; in hisi_register_clkgate_sep()
122 sclk->hw.init = &init; in hisi_register_clkgate_sep()
124 clk = clk_register(dev, &sclk->hw); in hisi_register_clkgate_sep()
126 kfree(sclk); in hisi_register_clkgate_sep()