Lines Matching refs:cpuclk

150 			struct exynos_cpuclk *cpuclk, void __iomem *base)  in exynos_cpuclk_pre_rate_change()  argument
152 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; in exynos_cpuclk_pre_rate_change()
153 unsigned long alt_prate = clk_hw_get_rate(cpuclk->alt_parent); in exynos_cpuclk_pre_rate_change()
165 spin_lock_irqsave(cpuclk->lock, flags); in exynos_cpuclk_pre_rate_change()
173 if (cpuclk->flags & CLK_CPU_HAS_DIV1) { in exynos_cpuclk_pre_rate_change()
194 if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) { in exynos_cpuclk_pre_rate_change()
215 if (cpuclk->flags & CLK_CPU_HAS_DIV1) { in exynos_cpuclk_pre_rate_change()
221 spin_unlock_irqrestore(cpuclk->lock, flags); in exynos_cpuclk_pre_rate_change()
227 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos_cpuclk_post_rate_change() argument
229 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; in exynos_cpuclk_post_rate_change()
235 if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) { in exynos_cpuclk_post_rate_change()
243 spin_lock_irqsave(cpuclk->lock, flags); in exynos_cpuclk_post_rate_change()
250 if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) { in exynos_cpuclk_post_rate_change()
256 spin_unlock_irqrestore(cpuclk->lock, flags); in exynos_cpuclk_post_rate_change()
278 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos5433_cpuclk_pre_rate_change() argument
280 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; in exynos5433_cpuclk_pre_rate_change()
281 unsigned long alt_prate = clk_hw_get_rate(cpuclk->alt_parent); in exynos5433_cpuclk_pre_rate_change()
293 spin_lock_irqsave(cpuclk->lock, flags); in exynos5433_cpuclk_pre_rate_change()
332 spin_unlock_irqrestore(cpuclk->lock, flags); in exynos5433_cpuclk_pre_rate_change()
338 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos5433_cpuclk_post_rate_change() argument
344 spin_lock_irqsave(cpuclk->lock, flags); in exynos5433_cpuclk_post_rate_change()
352 spin_unlock_irqrestore(cpuclk->lock, flags); in exynos5433_cpuclk_post_rate_change()
364 struct exynos_cpuclk *cpuclk; in exynos_cpuclk_notifier_cb() local
368 cpuclk = container_of(nb, struct exynos_cpuclk, clk_nb); in exynos_cpuclk_notifier_cb()
369 base = cpuclk->ctrl_base; in exynos_cpuclk_notifier_cb()
372 err = exynos_cpuclk_pre_rate_change(ndata, cpuclk, base); in exynos_cpuclk_notifier_cb()
374 err = exynos_cpuclk_post_rate_change(ndata, cpuclk, base); in exynos_cpuclk_notifier_cb()
387 struct exynos_cpuclk *cpuclk; in exynos5433_cpuclk_notifier_cb() local
391 cpuclk = container_of(nb, struct exynos_cpuclk, clk_nb); in exynos5433_cpuclk_notifier_cb()
392 base = cpuclk->ctrl_base; in exynos5433_cpuclk_notifier_cb()
395 err = exynos5433_cpuclk_pre_rate_change(ndata, cpuclk, base); in exynos5433_cpuclk_notifier_cb()
397 err = exynos5433_cpuclk_post_rate_change(ndata, cpuclk, base); in exynos5433_cpuclk_notifier_cb()
409 struct exynos_cpuclk *cpuclk; in exynos_register_cpu_clock() local
419 cpuclk = kzalloc(sizeof(*cpuclk), GFP_KERNEL); in exynos_register_cpu_clock()
420 if (!cpuclk) in exynos_register_cpu_clock()
431 cpuclk->alt_parent = alt_parent; in exynos_register_cpu_clock()
432 cpuclk->hw.init = &init; in exynos_register_cpu_clock()
433 cpuclk->ctrl_base = ctx->reg_base + offset; in exynos_register_cpu_clock()
434 cpuclk->lock = &ctx->lock; in exynos_register_cpu_clock()
435 cpuclk->flags = flags; in exynos_register_cpu_clock()
437 cpuclk->clk_nb.notifier_call = exynos5433_cpuclk_notifier_cb; in exynos_register_cpu_clock()
439 cpuclk->clk_nb.notifier_call = exynos_cpuclk_notifier_cb; in exynos_register_cpu_clock()
442 ret = clk_notifier_register(parent->clk, &cpuclk->clk_nb); in exynos_register_cpu_clock()
449 cpuclk->cfg = kmemdup(cfg, sizeof(*cfg) * num_cfgs, GFP_KERNEL); in exynos_register_cpu_clock()
450 if (!cpuclk->cfg) { in exynos_register_cpu_clock()
455 ret = clk_hw_register(NULL, &cpuclk->hw); in exynos_register_cpu_clock()
461 samsung_clk_add_lookup(ctx, &cpuclk->hw, lookup_id); in exynos_register_cpu_clock()
465 kfree(cpuclk->cfg); in exynos_register_cpu_clock()
467 clk_notifier_unregister(parent->clk, &cpuclk->clk_nb); in exynos_register_cpu_clock()
469 kfree(cpuclk); in exynos_register_cpu_clock()