Lines Matching refs:ctx

70 	struct samsung_clk_provider *ctx;
73 ctx = kzalloc(struct_size(ctx, clk_data.hws, nr_clks), GFP_KERNEL);
74 if (!ctx)
78 ctx->clk_data.hws[i] = ERR_PTR(-ENOENT);
80 ctx->dev = dev;
81 ctx->reg_base = base;
82 ctx->clk_data.num = nr_clks;
83 spin_lock_init(&ctx->lock);
85 return ctx;
89 struct samsung_clk_provider *ctx)
93 &ctx->clk_data))
99 void samsung_clk_add_lookup(struct samsung_clk_provider *ctx,
103 ctx->clk_data.hws[id] = clk_hw;
107 void __init samsung_clk_register_alias(struct samsung_clk_provider *ctx,
121 clk_hw = ctx->clk_data.hws[list->id];
137 void __init samsung_clk_register_fixed_rate(struct samsung_clk_provider *ctx,
145 clk_hw = clk_hw_register_fixed_rate(ctx->dev, list->name,
153 samsung_clk_add_lookup(ctx, clk_hw, list->id);
167 void __init samsung_clk_register_fixed_factor(struct samsung_clk_provider *ctx,
174 clk_hw = clk_hw_register_fixed_factor(ctx->dev, list->name,
182 samsung_clk_add_lookup(ctx, clk_hw, list->id);
187 void __init samsung_clk_register_mux(struct samsung_clk_provider *ctx,
195 clk_hw = clk_hw_register_mux(ctx->dev, list->name,
197 ctx->reg_base + list->offset,
198 list->shift, list->width, list->mux_flags, &ctx->lock);
205 samsung_clk_add_lookup(ctx, clk_hw, list->id);
210 void __init samsung_clk_register_div(struct samsung_clk_provider *ctx,
219 clk_hw = clk_hw_register_divider_table(ctx->dev,
221 ctx->reg_base + list->offset,
223 list->table, &ctx->lock);
225 clk_hw = clk_hw_register_divider(ctx->dev, list->name,
227 ctx->reg_base + list->offset, list->shift,
228 list->width, list->div_flags, &ctx->lock);
235 samsung_clk_add_lookup(ctx, clk_hw, list->id);
240 void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx,
248 clk_hw = clk_hw_register_gate(ctx->dev, list->name, list->parent_name,
249 list->flags, ctx->reg_base + list->offset,
250 list->bit_idx, list->gate_flags, &ctx->lock);
257 samsung_clk_add_lookup(ctx, clk_hw, list->id);
265 void __init samsung_clk_of_register_fixed_ext(struct samsung_clk_provider *ctx,
279 samsung_clk_register_fixed_rate(ctx, fixed_rate_clk, nr_fixed_rate_clk);
340 * @ctx: Clock provider object
343 void __init samsung_cmu_register_clocks(struct samsung_clk_provider *ctx,
347 samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks);
349 samsung_clk_register_mux(ctx, cmu->mux_clks, cmu->nr_mux_clks);
351 samsung_clk_register_div(ctx, cmu->div_clks, cmu->nr_div_clks);
353 samsung_clk_register_gate(ctx, cmu->gate_clks,
356 samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
359 samsung_clk_register_fixed_factor(ctx, cmu->fixed_factor_clks,
362 samsung_clk_register_cpu(ctx, cmu->cpu_clks, cmu->nr_cpu_clks);
374 struct samsung_clk_provider *ctx;
382 ctx = samsung_clk_init(NULL, reg_base, cmu->nr_clk_ids);
383 samsung_cmu_register_clocks(ctx, cmu);
390 samsung_clk_of_add_provider(np, ctx);
392 return ctx;