1 // SPDX-License-Identifier: GPL-2.0-only
3 * OMAP DPLL clock support
5 * Copyright (C) 2013 Texas Instruments, Inc.
10 #include <linux/clk.h>
11 #include <linux/clk-provider.h>
12 #include <linux/slab.h>
13 #include <linux/err.h>
15 #include <linux/of_address.h>
16 #include <linux/clk/ti.h>
20 #define pr_fmt(fmt) "%s: " fmt, __func__
22 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
23 defined(CONFIG_SOC_DRA7XX)
24 static const struct clk_ops dpll_m4xen_ck_ops = {
25 .enable = &omap3_noncore_dpll_enable,
26 .disable = &omap3_noncore_dpll_disable,
27 .recalc_rate = &omap4_dpll_regm4xen_recalc,
28 .round_rate = &omap4_dpll_regm4xen_round_rate,
29 .set_rate = &omap3_noncore_dpll_set_rate,
30 .set_parent = &omap3_noncore_dpll_set_parent,
31 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
32 .determine_rate = &omap4_dpll_regm4xen_determine_rate,
33 .get_parent = &omap2_init_dpll_parent,
34 .save_context = &omap3_core_dpll_save_context,
35 .restore_context = &omap3_core_dpll_restore_context,
39 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) || \
40 defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) || \
41 defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
42 static const struct clk_ops dpll_core_ck_ops = {
43 .recalc_rate = &omap3_dpll_recalc,
44 .get_parent = &omap2_init_dpll_parent,
47 static const struct clk_ops dpll_ck_ops = {
48 .enable = &omap3_noncore_dpll_enable,
49 .disable = &omap3_noncore_dpll_disable,
50 .recalc_rate = &omap3_dpll_recalc,
51 .round_rate = &omap2_dpll_round_rate,
52 .set_rate = &omap3_noncore_dpll_set_rate,
53 .set_parent = &omap3_noncore_dpll_set_parent,
54 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
55 .determine_rate = &omap3_noncore_dpll_determine_rate,
56 .get_parent = &omap2_init_dpll_parent,
57 .save_context = &omap3_noncore_dpll_save_context,
58 .restore_context = &omap3_noncore_dpll_restore_context,
61 static const struct clk_ops dpll_no_gate_ck_ops = {
62 .recalc_rate = &omap3_dpll_recalc,
63 .get_parent = &omap2_init_dpll_parent,
64 .round_rate = &omap2_dpll_round_rate,
65 .set_rate = &omap3_noncore_dpll_set_rate,
66 .set_parent = &omap3_noncore_dpll_set_parent,
67 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
68 .determine_rate = &omap3_noncore_dpll_determine_rate,
69 .save_context = &omap3_noncore_dpll_save_context,
70 .restore_context = &omap3_noncore_dpll_restore_context
73 static const struct clk_ops dpll_core_ck_ops = {};
74 static const struct clk_ops dpll_ck_ops = {};
75 static const struct clk_ops dpll_no_gate_ck_ops = {};
76 const struct clk_hw_omap_ops clkhwops_omap3_dpll = {};
79 #ifdef CONFIG_ARCH_OMAP2
80 static const struct clk_ops omap2_dpll_core_ck_ops = {
81 .get_parent = &omap2_init_dpll_parent,
82 .recalc_rate = &omap2_dpllcore_recalc,
83 .round_rate = &omap2_dpll_round_rate,
84 .set_rate = &omap2_reprogram_dpllcore,
87 static const struct clk_ops omap2_dpll_core_ck_ops = {};
90 #ifdef CONFIG_ARCH_OMAP3
91 static const struct clk_ops omap3_dpll_core_ck_ops = {
92 .get_parent = &omap2_init_dpll_parent,
93 .recalc_rate = &omap3_dpll_recalc,
94 .round_rate = &omap2_dpll_round_rate,
97 static const struct clk_ops omap3_dpll_ck_ops = {
98 .enable = &omap3_noncore_dpll_enable,
99 .disable = &omap3_noncore_dpll_disable,
100 .get_parent = &omap2_init_dpll_parent,
101 .recalc_rate = &omap3_dpll_recalc,
102 .set_rate = &omap3_noncore_dpll_set_rate,
103 .set_parent = &omap3_noncore_dpll_set_parent,
104 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
105 .determine_rate = &omap3_noncore_dpll_determine_rate,
106 .round_rate = &omap2_dpll_round_rate,
109 static const struct clk_ops omap3_dpll5_ck_ops = {
110 .enable = &omap3_noncore_dpll_enable,
111 .disable = &omap3_noncore_dpll_disable,
112 .get_parent = &omap2_init_dpll_parent,
113 .recalc_rate = &omap3_dpll_recalc,
114 .set_rate = &omap3_dpll5_set_rate,
115 .set_parent = &omap3_noncore_dpll_set_parent,
116 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
117 .determine_rate = &omap3_noncore_dpll_determine_rate,
118 .round_rate = &omap2_dpll_round_rate,
121 static const struct clk_ops omap3_dpll_per_ck_ops = {
122 .enable = &omap3_noncore_dpll_enable,
123 .disable = &omap3_noncore_dpll_disable,
124 .get_parent = &omap2_init_dpll_parent,
125 .recalc_rate = &omap3_dpll_recalc,
126 .set_rate = &omap3_dpll4_set_rate,
127 .set_parent = &omap3_noncore_dpll_set_parent,
128 .set_rate_and_parent = &omap3_dpll4_set_rate_and_parent,
129 .determine_rate = &omap3_noncore_dpll_determine_rate,
130 .round_rate = &omap2_dpll_round_rate,
134 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
135 defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \
136 defined(CONFIG_SOC_AM43XX)
137 static const struct clk_ops dpll_x2_ck_ops = {
138 .recalc_rate = &omap3_clkoutx2_recalc,
143 * _register_dpll - low level registration of a DPLL clock
144 * @user: pointer to the hardware clock definition for the clock
145 * @node: device node for the clock
147 * Finalizes DPLL registration process. In case a failure (clk-ref or
148 * clk-bypass is missing), the clock is added to retry list and
149 * the initialization is retried on later stage.
151 static void __init _register_dpll(void *user,
152 struct device_node *node)
154 struct clk_hw *hw = user;
155 struct clk_hw_omap *clk_hw = to_clk_hw_omap(hw);
156 struct dpll_data *dd = clk_hw->dpll_data;
159 const struct clk_init_data *init = hw->init;
161 clk = of_clk_get(node, 0);
163 pr_debug("clk-ref missing for %pOFn, retry later\n",
165 if (!ti_clk_retry_init(node, hw, _register_dpll))
171 dd->clk_ref = __clk_get_hw(clk);
173 clk = of_clk_get(node, 1);
176 pr_debug("clk-bypass missing for %pOFn, retry later\n",
178 if (!ti_clk_retry_init(node, hw, _register_dpll))
184 dd->clk_bypass = __clk_get_hw(clk);
186 /* register the clock */
187 name = ti_dt_clk_name(node);
188 clk = of_ti_clk_register_omap_hw(node, &clk_hw->hw, name);
191 of_clk_add_provider(node, of_clk_src_simple_get, clk);
192 kfree(init->parent_names);
198 kfree(clk_hw->dpll_data);
199 kfree(init->parent_names);
204 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
205 defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \
206 defined(CONFIG_SOC_AM43XX)
208 * _register_dpll_x2 - Registers a DPLLx2 clock
209 * @node: device node for this clock
210 * @ops: clk_ops for this clock
211 * @hw_ops: clk_hw_ops for this clock
213 * Initializes a DPLL x 2 clock from device tree data.
215 static void _register_dpll_x2(struct device_node *node,
216 const struct clk_ops *ops,
217 const struct clk_hw_omap_ops *hw_ops)
220 struct clk_init_data init = { NULL };
221 struct clk_hw_omap *clk_hw;
222 const char *name = ti_dt_clk_name(node);
223 const char *parent_name;
225 parent_name = of_clk_get_parent_name(node, 0);
227 pr_err("%pOFn must have parent\n", node);
231 clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
235 clk_hw->ops = hw_ops;
236 clk_hw->hw.init = &init;
240 init.parent_names = &parent_name;
241 init.num_parents = 1;
243 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
244 defined(CONFIG_SOC_DRA7XX)
245 if (hw_ops == &clkhwops_omap4_dpllmx) {
248 /* Check if register defined, if not, drop hw-ops */
249 ret = of_property_count_elems_of_size(node, "reg", 1);
252 } else if (ti_clk_get_reg_addr(node, 0, &clk_hw->clksel_reg)) {
259 /* register the clock */
260 clk = of_ti_clk_register_omap_hw(node, &clk_hw->hw, name);
265 of_clk_add_provider(node, of_clk_src_simple_get, clk);
270 * of_ti_dpll_setup - Setup function for OMAP DPLL clocks
271 * @node: device node containing the DPLL info
272 * @ops: ops for the DPLL
273 * @ddt: DPLL data template to use
275 * Initializes a DPLL clock from device tree data.
277 static void __init of_ti_dpll_setup(struct device_node *node,
278 const struct clk_ops *ops,
279 const struct dpll_data *ddt)
281 struct clk_hw_omap *clk_hw = NULL;
282 struct clk_init_data *init = NULL;
283 const char **parent_names = NULL;
284 struct dpll_data *dd = NULL;
289 dd = kmemdup(ddt, sizeof(*dd), GFP_KERNEL);
290 clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
291 init = kzalloc(sizeof(*init), GFP_KERNEL);
292 if (!dd || !clk_hw || !init)
295 clk_hw->dpll_data = dd;
296 clk_hw->ops = &clkhwops_omap3_dpll;
297 clk_hw->hw.init = init;
299 init->name = ti_dt_clk_name(node);
302 init->num_parents = of_clk_get_parent_count(node);
303 if (!init->num_parents) {
304 pr_err("%pOFn must have parent(s)\n", node);
308 parent_names = kcalloc(init->num_parents, sizeof(char *), GFP_KERNEL);
312 of_clk_parent_fill(node, parent_names, init->num_parents);
314 init->parent_names = parent_names;
316 if (ti_clk_get_reg_addr(node, 0, &dd->control_reg))
320 * Special case for OMAP2 DPLL, register order is different due to
321 * missing idlest_reg, also clkhwops is different. Detected from
322 * missing idlest_mask.
324 if (!dd->idlest_mask) {
325 if (ti_clk_get_reg_addr(node, 1, &dd->mult_div1_reg))
327 #ifdef CONFIG_ARCH_OMAP2
328 clk_hw->ops = &clkhwops_omap2xxx_dpll;
329 omap2xxx_clkt_dpllcore_init(&clk_hw->hw);
332 if (ti_clk_get_reg_addr(node, 1, &dd->idlest_reg))
335 if (ti_clk_get_reg_addr(node, 2, &dd->mult_div1_reg))
339 if (dd->autoidle_mask) {
340 if (ti_clk_get_reg_addr(node, 3, &dd->autoidle_reg))
348 if (dd->ssc_deltam_int_mask && dd->ssc_deltam_frac_mask &&
349 dd->ssc_modfreq_mant_mask && dd->ssc_modfreq_exp_mask) {
350 if (ti_clk_get_reg_addr(node, ssc_clk_index++,
351 &dd->ssc_deltam_reg))
354 if (ti_clk_get_reg_addr(node, ssc_clk_index++,
355 &dd->ssc_modfreq_reg))
358 of_property_read_u32(node, "ti,ssc-modfreq-hz",
360 of_property_read_u32(node, "ti,ssc-deltam", &dd->ssc_deltam);
362 of_property_read_bool(node, "ti,ssc-downspread");
365 if (of_property_read_bool(node, "ti,low-power-stop"))
366 dpll_mode |= 1 << DPLL_LOW_POWER_STOP;
368 if (of_property_read_bool(node, "ti,low-power-bypass"))
369 dpll_mode |= 1 << DPLL_LOW_POWER_BYPASS;
371 if (of_property_read_bool(node, "ti,lock"))
372 dpll_mode |= 1 << DPLL_LOCKED;
374 if (!of_property_read_u32(node, "ti,min-div", &min_div) &&
375 min_div > dd->min_divider)
376 dd->min_divider = min_div;
379 dd->modes = dpll_mode;
381 _register_dpll(&clk_hw->hw, node);
391 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
392 defined(CONFIG_SOC_DRA7XX)
393 static void __init of_ti_omap4_dpll_x2_setup(struct device_node *node)
395 _register_dpll_x2(node, &dpll_x2_ck_ops, &clkhwops_omap4_dpllmx);
397 CLK_OF_DECLARE(ti_omap4_dpll_x2_clock, "ti,omap4-dpll-x2-clock",
398 of_ti_omap4_dpll_x2_setup);
401 #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
402 static void __init of_ti_am3_dpll_x2_setup(struct device_node *node)
404 _register_dpll_x2(node, &dpll_x2_ck_ops, NULL);
406 CLK_OF_DECLARE(ti_am3_dpll_x2_clock, "ti,am3-dpll-x2-clock",
407 of_ti_am3_dpll_x2_setup);
410 #ifdef CONFIG_ARCH_OMAP3
411 static void __init of_ti_omap3_dpll_setup(struct device_node *node)
413 const struct dpll_data dd = {
416 .autoidle_mask = 0x7,
417 .mult_mask = 0x7ff << 8,
419 .max_multiplier = 2047,
422 .freqsel_mask = 0xf0,
423 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
426 if ((of_machine_is_compatible("ti,omap3630") ||
427 of_machine_is_compatible("ti,omap36xx")) &&
428 of_node_name_eq(node, "dpll5_ck"))
429 of_ti_dpll_setup(node, &omap3_dpll5_ck_ops, &dd);
431 of_ti_dpll_setup(node, &omap3_dpll_ck_ops, &dd);
433 CLK_OF_DECLARE(ti_omap3_dpll_clock, "ti,omap3-dpll-clock",
434 of_ti_omap3_dpll_setup);
436 static void __init of_ti_omap3_core_dpll_setup(struct device_node *node)
438 const struct dpll_data dd = {
441 .autoidle_mask = 0x7,
442 .mult_mask = 0x7ff << 16,
443 .div1_mask = 0x7f << 8,
444 .max_multiplier = 2047,
447 .freqsel_mask = 0xf0,
450 of_ti_dpll_setup(node, &omap3_dpll_core_ck_ops, &dd);
452 CLK_OF_DECLARE(ti_omap3_core_dpll_clock, "ti,omap3-dpll-core-clock",
453 of_ti_omap3_core_dpll_setup);
455 static void __init of_ti_omap3_per_dpll_setup(struct device_node *node)
457 const struct dpll_data dd = {
458 .idlest_mask = 0x1 << 1,
459 .enable_mask = 0x7 << 16,
460 .autoidle_mask = 0x7 << 3,
461 .mult_mask = 0x7ff << 8,
463 .max_multiplier = 2047,
466 .freqsel_mask = 0xf00000,
467 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
470 of_ti_dpll_setup(node, &omap3_dpll_per_ck_ops, &dd);
472 CLK_OF_DECLARE(ti_omap3_per_dpll_clock, "ti,omap3-dpll-per-clock",
473 of_ti_omap3_per_dpll_setup);
475 static void __init of_ti_omap3_per_jtype_dpll_setup(struct device_node *node)
477 const struct dpll_data dd = {
478 .idlest_mask = 0x1 << 1,
479 .enable_mask = 0x7 << 16,
480 .autoidle_mask = 0x7 << 3,
481 .mult_mask = 0xfff << 8,
483 .max_multiplier = 4095,
486 .sddiv_mask = 0xff << 24,
487 .dco_mask = 0xe << 20,
488 .flags = DPLL_J_TYPE,
489 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
492 of_ti_dpll_setup(node, &omap3_dpll_per_ck_ops, &dd);
494 CLK_OF_DECLARE(ti_omap3_per_jtype_dpll_clock, "ti,omap3-dpll-per-j-type-clock",
495 of_ti_omap3_per_jtype_dpll_setup);
498 static void __init of_ti_omap4_dpll_setup(struct device_node *node)
500 const struct dpll_data dd = {
503 .autoidle_mask = 0x7,
504 .mult_mask = 0x7ff << 8,
506 .max_multiplier = 2047,
509 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
512 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
514 CLK_OF_DECLARE(ti_omap4_dpll_clock, "ti,omap4-dpll-clock",
515 of_ti_omap4_dpll_setup);
517 static void __init of_ti_omap5_mpu_dpll_setup(struct device_node *node)
519 const struct dpll_data dd = {
522 .autoidle_mask = 0x7,
523 .mult_mask = 0x7ff << 8,
525 .max_multiplier = 2047,
528 .dcc_rate = 1400000000, /* DCC beyond 1.4GHz */
530 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
533 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
535 CLK_OF_DECLARE(of_ti_omap5_mpu_dpll_clock, "ti,omap5-mpu-dpll-clock",
536 of_ti_omap5_mpu_dpll_setup);
538 static void __init of_ti_omap4_core_dpll_setup(struct device_node *node)
540 const struct dpll_data dd = {
543 .autoidle_mask = 0x7,
544 .mult_mask = 0x7ff << 8,
546 .max_multiplier = 2047,
549 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
552 of_ti_dpll_setup(node, &dpll_core_ck_ops, &dd);
554 CLK_OF_DECLARE(ti_omap4_core_dpll_clock, "ti,omap4-dpll-core-clock",
555 of_ti_omap4_core_dpll_setup);
557 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
558 defined(CONFIG_SOC_DRA7XX)
559 static void __init of_ti_omap4_m4xen_dpll_setup(struct device_node *node)
561 const struct dpll_data dd = {
564 .autoidle_mask = 0x7,
565 .mult_mask = 0x7ff << 8,
567 .max_multiplier = 2047,
571 .lpmode_mask = 1 << 10,
572 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
575 of_ti_dpll_setup(node, &dpll_m4xen_ck_ops, &dd);
577 CLK_OF_DECLARE(ti_omap4_m4xen_dpll_clock, "ti,omap4-dpll-m4xen-clock",
578 of_ti_omap4_m4xen_dpll_setup);
580 static void __init of_ti_omap4_jtype_dpll_setup(struct device_node *node)
582 const struct dpll_data dd = {
585 .autoidle_mask = 0x7,
586 .mult_mask = 0xfff << 8,
588 .max_multiplier = 4095,
591 .sddiv_mask = 0xff << 24,
592 .flags = DPLL_J_TYPE,
593 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
596 of_ti_dpll_setup(node, &dpll_m4xen_ck_ops, &dd);
598 CLK_OF_DECLARE(ti_omap4_jtype_dpll_clock, "ti,omap4-dpll-j-type-clock",
599 of_ti_omap4_jtype_dpll_setup);
602 static void __init of_ti_am3_no_gate_dpll_setup(struct device_node *node)
604 const struct dpll_data dd = {
607 .ssc_enable_mask = 0x1 << 12,
608 .ssc_downspread_mask = 0x1 << 14,
609 .mult_mask = 0x7ff << 8,
611 .ssc_deltam_int_mask = 0x3 << 18,
612 .ssc_deltam_frac_mask = 0x3ffff,
613 .ssc_modfreq_mant_mask = 0x7f,
614 .ssc_modfreq_exp_mask = 0x7 << 8,
615 .max_multiplier = 2047,
618 .max_rate = 1000000000,
619 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
622 of_ti_dpll_setup(node, &dpll_no_gate_ck_ops, &dd);
624 CLK_OF_DECLARE(ti_am3_no_gate_dpll_clock, "ti,am3-dpll-no-gate-clock",
625 of_ti_am3_no_gate_dpll_setup);
627 static void __init of_ti_am3_jtype_dpll_setup(struct device_node *node)
629 const struct dpll_data dd = {
632 .mult_mask = 0x7ff << 8,
634 .max_multiplier = 4095,
637 .flags = DPLL_J_TYPE,
638 .max_rate = 2000000000,
639 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
642 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
644 CLK_OF_DECLARE(ti_am3_jtype_dpll_clock, "ti,am3-dpll-j-type-clock",
645 of_ti_am3_jtype_dpll_setup);
647 static void __init of_ti_am3_no_gate_jtype_dpll_setup(struct device_node *node)
649 const struct dpll_data dd = {
652 .mult_mask = 0x7ff << 8,
654 .max_multiplier = 2047,
657 .max_rate = 2000000000,
658 .flags = DPLL_J_TYPE,
659 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
662 of_ti_dpll_setup(node, &dpll_no_gate_ck_ops, &dd);
664 CLK_OF_DECLARE(ti_am3_no_gate_jtype_dpll_clock,
665 "ti,am3-dpll-no-gate-j-type-clock",
666 of_ti_am3_no_gate_jtype_dpll_setup);
668 static void __init of_ti_am3_dpll_setup(struct device_node *node)
670 const struct dpll_data dd = {
673 .ssc_enable_mask = 0x1 << 12,
674 .ssc_downspread_mask = 0x1 << 14,
675 .mult_mask = 0x7ff << 8,
677 .ssc_deltam_int_mask = 0x3 << 18,
678 .ssc_deltam_frac_mask = 0x3ffff,
679 .ssc_modfreq_mant_mask = 0x7f,
680 .ssc_modfreq_exp_mask = 0x7 << 8,
681 .max_multiplier = 2047,
684 .max_rate = 1000000000,
685 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
688 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
690 CLK_OF_DECLARE(ti_am3_dpll_clock, "ti,am3-dpll-clock", of_ti_am3_dpll_setup);
692 static void __init of_ti_am3_core_dpll_setup(struct device_node *node)
694 const struct dpll_data dd = {
697 .mult_mask = 0x7ff << 8,
699 .max_multiplier = 2047,
702 .max_rate = 1000000000,
703 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
706 of_ti_dpll_setup(node, &dpll_core_ck_ops, &dd);
708 CLK_OF_DECLARE(ti_am3_core_dpll_clock, "ti,am3-dpll-core-clock",
709 of_ti_am3_core_dpll_setup);
711 static void __init of_ti_omap2_core_dpll_setup(struct device_node *node)
713 const struct dpll_data dd = {
715 .mult_mask = 0x3ff << 12,
716 .div1_mask = 0xf << 8,
721 of_ti_dpll_setup(node, &omap2_dpll_core_ck_ops, &dd);
723 CLK_OF_DECLARE(ti_omap2_core_dpll_clock, "ti,omap2-dpll-core-clock",
724 of_ti_omap2_core_dpll_setup);