Lines Matching refs:s3c24xx_dclk
128 struct s3c24xx_dclk { struct
140 container_of(x, struct s3c24xx_dclk, dclk0_div_change_nb) argument
143 container_of(x, struct s3c24xx_dclk, dclk1_div_change_nb)
173 static void s3c24xx_dclk_update_cmp(struct s3c24xx_dclk *s3c24xx_dclk, in s3c24xx_dclk_update_cmp() argument
179 spin_lock_irqsave(&s3c24xx_dclk->dclk_lock, flags); in s3c24xx_dclk_update_cmp()
181 dclk_con = readl_relaxed(s3c24xx_dclk->base); in s3c24xx_dclk_update_cmp()
189 writel_relaxed(dclk_con, s3c24xx_dclk->base); in s3c24xx_dclk_update_cmp()
191 spin_unlock_irqrestore(&s3c24xx_dclk->dclk_lock, flags); in s3c24xx_dclk_update_cmp()
197 struct s3c24xx_dclk *s3c24xx_dclk = to_s3c24xx_dclk0(nb); in s3c24xx_dclk0_div_notify() local
200 s3c24xx_dclk_update_cmp(s3c24xx_dclk, in s3c24xx_dclk0_div_notify()
210 struct s3c24xx_dclk *s3c24xx_dclk = to_s3c24xx_dclk1(nb); in s3c24xx_dclk1_div_notify() local
213 s3c24xx_dclk_update_cmp(s3c24xx_dclk, in s3c24xx_dclk1_div_notify()
223 struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev); in s3c24xx_dclk_suspend() local
225 s3c24xx_dclk->reg_save = readl_relaxed(s3c24xx_dclk->base); in s3c24xx_dclk_suspend()
231 struct s3c24xx_dclk *s3c24xx_dclk = dev_get_drvdata(dev); in s3c24xx_dclk_resume() local
233 writel_relaxed(s3c24xx_dclk->reg_save, s3c24xx_dclk->base); in s3c24xx_dclk_resume()
243 struct s3c24xx_dclk *s3c24xx_dclk; in s3c24xx_dclk_probe() local
248 s3c24xx_dclk = devm_kzalloc(&pdev->dev, in s3c24xx_dclk_probe()
249 struct_size(s3c24xx_dclk, clk_data.hws, in s3c24xx_dclk_probe()
252 if (!s3c24xx_dclk) in s3c24xx_dclk_probe()
255 clk_table = s3c24xx_dclk->clk_data.hws; in s3c24xx_dclk_probe()
257 s3c24xx_dclk->dev = &pdev->dev; in s3c24xx_dclk_probe()
258 s3c24xx_dclk->clk_data.num = DCLK_MAX_CLKS; in s3c24xx_dclk_probe()
259 platform_set_drvdata(pdev, s3c24xx_dclk); in s3c24xx_dclk_probe()
260 spin_lock_init(&s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
262 s3c24xx_dclk->base = devm_platform_ioremap_resource(pdev, 0); in s3c24xx_dclk_probe()
263 if (IS_ERR(s3c24xx_dclk->base)) in s3c24xx_dclk_probe()
264 return PTR_ERR(s3c24xx_dclk->base); in s3c24xx_dclk_probe()
273 s3c24xx_dclk->base, 1, 1, 0, in s3c24xx_dclk_probe()
274 &s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
278 s3c24xx_dclk->base, 17, 1, 0, in s3c24xx_dclk_probe()
279 &s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
282 "mux_dclk0", 0, s3c24xx_dclk->base, in s3c24xx_dclk_probe()
283 4, 4, 0, &s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
285 "mux_dclk1", 0, s3c24xx_dclk->base, in s3c24xx_dclk_probe()
286 20, 4, 0, &s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
290 s3c24xx_dclk->base, 0, 0, in s3c24xx_dclk_probe()
291 &s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
294 s3c24xx_dclk->base, 16, 0, in s3c24xx_dclk_probe()
295 &s3c24xx_dclk->dclk_lock); in s3c24xx_dclk_probe()
326 s3c24xx_dclk->dclk0_div_change_nb.notifier_call = in s3c24xx_dclk_probe()
329 s3c24xx_dclk->dclk1_div_change_nb.notifier_call = in s3c24xx_dclk_probe()
333 &s3c24xx_dclk->dclk0_div_change_nb); in s3c24xx_dclk_probe()
338 &s3c24xx_dclk->dclk1_div_change_nb); in s3c24xx_dclk_probe()
346 &s3c24xx_dclk->dclk0_div_change_nb); in s3c24xx_dclk_probe()
357 struct s3c24xx_dclk *s3c24xx_dclk = platform_get_drvdata(pdev); in s3c24xx_dclk_remove() local
358 struct clk_hw **clk_table = s3c24xx_dclk->clk_data.hws; in s3c24xx_dclk_remove()
362 &s3c24xx_dclk->dclk1_div_change_nb); in s3c24xx_dclk_remove()
364 &s3c24xx_dclk->dclk0_div_change_nb); in s3c24xx_dclk_remove()