Lines Matching refs:sclk
50 struct clkgate_separated *sclk; in clkgate_separated_enable() local
54 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_enable()
55 if (sclk->lock) in clkgate_separated_enable()
56 spin_lock_irqsave(sclk->lock, flags); in clkgate_separated_enable()
57 reg = BIT(sclk->bit_idx); in clkgate_separated_enable()
58 writel_relaxed(reg, sclk->enable); in clkgate_separated_enable()
59 readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_enable()
60 if (sclk->lock) in clkgate_separated_enable()
61 spin_unlock_irqrestore(sclk->lock, flags); in clkgate_separated_enable()
67 struct clkgate_separated *sclk; in clkgate_separated_disable() local
71 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_disable()
72 if (sclk->lock) in clkgate_separated_disable()
73 spin_lock_irqsave(sclk->lock, flags); in clkgate_separated_disable()
74 reg = BIT(sclk->bit_idx); in clkgate_separated_disable()
75 writel_relaxed(reg, sclk->enable + CLKGATE_SEPERATED_DISABLE); in clkgate_separated_disable()
76 readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_disable()
77 if (sclk->lock) in clkgate_separated_disable()
78 spin_unlock_irqrestore(sclk->lock, flags); in clkgate_separated_disable()
83 struct clkgate_separated *sclk; in clkgate_separated_is_enabled() local
86 sclk = container_of(hw, struct clkgate_separated, hw); in clkgate_separated_is_enabled()
87 reg = readl_relaxed(sclk->enable + CLKGATE_SEPERATED_STATUS); in clkgate_separated_is_enabled()
88 reg &= BIT(sclk->bit_idx); in clkgate_separated_is_enabled()
105 struct clkgate_separated *sclk; in hisi_register_clkgate_sep() local
109 sclk = kzalloc(sizeof(*sclk), GFP_KERNEL); in hisi_register_clkgate_sep()
110 if (!sclk) { in hisi_register_clkgate_sep()
121 sclk->enable = reg + CLKGATE_SEPERATED_ENABLE; in hisi_register_clkgate_sep()
122 sclk->bit_idx = bit_idx; in hisi_register_clkgate_sep()
123 sclk->flags = clk_gate_flags; in hisi_register_clkgate_sep()
124 sclk->hw.init = &init; in hisi_register_clkgate_sep()
126 clk = clk_register(dev, &sclk->hw); in hisi_register_clkgate_sep()
128 kfree(sclk); in hisi_register_clkgate_sep()