Lines Matching refs:sclk
305 struct clk_src *sclk = to_src(hw); in src_clk_enable() local
306 u32 enreg = sclk->group1 ? SRC_PCKEN1 : SRC_PCKEN0; in src_clk_enable()
307 u32 sreg = sclk->group1 ? SRC_PCKSR1 : SRC_PCKSR0; in src_clk_enable()
309 writel(sclk->clkbit, src_base + enreg); in src_clk_enable()
311 while (!(readl(src_base + sreg) & sclk->clkbit)) in src_clk_enable()
318 struct clk_src *sclk = to_src(hw); in src_clk_disable() local
319 u32 disreg = sclk->group1 ? SRC_PCKDIS1 : SRC_PCKDIS0; in src_clk_disable()
320 u32 sreg = sclk->group1 ? SRC_PCKSR1 : SRC_PCKSR0; in src_clk_disable()
322 writel(sclk->clkbit, src_base + disreg); in src_clk_disable()
324 while (readl(src_base + sreg) & sclk->clkbit) in src_clk_disable()
330 struct clk_src *sclk = to_src(hw); in src_clk_is_enabled() local
331 u32 sreg = sclk->group1 ? SRC_PCKSR1 : SRC_PCKSR0; in src_clk_is_enabled()
334 return !!(val & sclk->clkbit); in src_clk_is_enabled()
356 struct clk_src *sclk; in src_clk_register() local
359 sclk = kzalloc(sizeof(*sclk), GFP_KERNEL); in src_clk_register()
360 if (!sclk) in src_clk_register()
372 sclk->hw.init = &init; in src_clk_register()
373 sclk->id = id; in src_clk_register()
374 sclk->group1 = (id > 31); in src_clk_register()
375 sclk->clkbit = BIT(id & 0x1f); in src_clk_register()
378 name, id, sclk->group1, sclk->clkbit); in src_clk_register()
380 ret = clk_hw_register(dev, &sclk->hw); in src_clk_register()
382 kfree(sclk); in src_clk_register()
386 return &sclk->hw; in src_clk_register()