2 * Copyright (C) 2014 STMicroelectronics (R&D) Limited
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
13 * Stephen Gallimore <stephen.gallimore@st.com>,
14 * Pankaj Dev <pankaj.dev@st.com>.
17 #include <linux/slab.h>
18 #include <linux/of_address.h>
19 #include <linux/clk.h>
20 #include <linux/clk-provider.h>
21 #include <linux/iopoll.h>
25 static DEFINE_SPINLOCK(clkgena_c32_odf_lock
);
26 DEFINE_SPINLOCK(clkgen_a9_lock
);
29 * PLL configuration register bits for PLL3200 C32
31 #define C32_NDIV_MASK (0xff)
32 #define C32_IDF_MASK (0x7)
33 #define C32_ODF_MASK (0x3f)
34 #define C32_LDF_MASK (0x7f)
35 #define C32_CP_MASK (0x1f)
37 #define C32_MAX_ODFS (4)
40 * PLL configuration register bits for PLL4600 C28
42 #define C28_NDIV_MASK (0xff)
43 #define C28_IDF_MASK (0x7)
44 #define C28_ODF_MASK (0x3f)
46 struct clkgen_pll_data
{
47 struct clkgen_field pdn_status
;
48 struct clkgen_field pdn_ctrl
;
49 struct clkgen_field locked_status
;
50 struct clkgen_field mdiv
;
51 struct clkgen_field ndiv
;
52 struct clkgen_field pdiv
;
53 struct clkgen_field idf
;
54 struct clkgen_field ldf
;
55 struct clkgen_field cp
;
56 unsigned int num_odfs
;
57 struct clkgen_field odf
[C32_MAX_ODFS
];
58 struct clkgen_field odf_gate
[C32_MAX_ODFS
];
60 struct clkgen_field switch2pll
;
62 const struct clk_ops
*ops
;
65 static const struct clk_ops stm_pll3200c32_ops
;
66 static const struct clk_ops stm_pll3200c32_a9_ops
;
67 static const struct clk_ops stm_pll4600c28_ops
;
69 static const struct clkgen_pll_data st_pll3200c32_407_a0
= {
71 .pdn_status
= CLKGEN_FIELD(0x2a0, 0x1, 8),
72 .pdn_ctrl
= CLKGEN_FIELD(0x2a0, 0x1, 8),
73 .locked_status
= CLKGEN_FIELD(0x2a0, 0x1, 24),
74 .ndiv
= CLKGEN_FIELD(0x2a4, C32_NDIV_MASK
, 16),
75 .idf
= CLKGEN_FIELD(0x2a4, C32_IDF_MASK
, 0x0),
77 .odf
= { CLKGEN_FIELD(0x2b4, C32_ODF_MASK
, 0) },
78 .odf_gate
= { CLKGEN_FIELD(0x2b4, 0x1, 6) },
79 .ops
= &stm_pll3200c32_ops
,
82 static const struct clkgen_pll_data st_pll3200c32_cx_0
= {
84 .pdn_status
= CLKGEN_FIELD(0x2a0, 0x1, 8),
85 .pdn_ctrl
= CLKGEN_FIELD(0x2a0, 0x1, 8),
86 .locked_status
= CLKGEN_FIELD(0x2a0, 0x1, 24),
87 .ndiv
= CLKGEN_FIELD(0x2a4, C32_NDIV_MASK
, 16),
88 .idf
= CLKGEN_FIELD(0x2a4, C32_IDF_MASK
, 0x0),
90 .odf
= { CLKGEN_FIELD(0x2b4, C32_ODF_MASK
, 0) },
91 .odf_gate
= { CLKGEN_FIELD(0x2b4, 0x1, 6) },
92 .ops
= &stm_pll3200c32_ops
,
95 static const struct clkgen_pll_data st_pll3200c32_cx_1
= {
97 .pdn_status
= CLKGEN_FIELD(0x2c8, 0x1, 8),
98 .pdn_ctrl
= CLKGEN_FIELD(0x2c8, 0x1, 8),
99 .locked_status
= CLKGEN_FIELD(0x2c8, 0x1, 24),
100 .ndiv
= CLKGEN_FIELD(0x2cc, C32_NDIV_MASK
, 16),
101 .idf
= CLKGEN_FIELD(0x2cc, C32_IDF_MASK
, 0x0),
103 .odf
= { CLKGEN_FIELD(0x2dc, C32_ODF_MASK
, 0) },
104 .odf_gate
= { CLKGEN_FIELD(0x2dc, 0x1, 6) },
105 .ops
= &stm_pll3200c32_ops
,
108 static const struct clkgen_pll_data st_pll3200c32_407_a9
= {
110 .pdn_status
= CLKGEN_FIELD(0x1a8, 0x1, 0),
111 .pdn_ctrl
= CLKGEN_FIELD(0x1a8, 0x1, 0),
112 .locked_status
= CLKGEN_FIELD(0x87c, 0x1, 0),
113 .ndiv
= CLKGEN_FIELD(0x1b0, C32_NDIV_MASK
, 0),
114 .idf
= CLKGEN_FIELD(0x1a8, C32_IDF_MASK
, 25),
116 .odf
= { CLKGEN_FIELD(0x1b0, C32_ODF_MASK
, 8) },
117 .odf_gate
= { CLKGEN_FIELD(0x1ac, 0x1, 28) },
118 .switch2pll_en
= true,
119 .cp
= CLKGEN_FIELD(0x1a8, C32_CP_MASK
, 1),
120 .switch2pll
= CLKGEN_FIELD(0x1a4, 0x1, 1),
121 .lock
= &clkgen_a9_lock
,
122 .ops
= &stm_pll3200c32_a9_ops
,
125 static struct clkgen_pll_data st_pll4600c28_418_a9
= {
127 .pdn_status
= CLKGEN_FIELD(0x1a8, 0x1, 0),
128 .pdn_ctrl
= CLKGEN_FIELD(0x1a8, 0x1, 0),
129 .locked_status
= CLKGEN_FIELD(0x87c, 0x1, 0),
130 .ndiv
= CLKGEN_FIELD(0x1b0, C28_NDIV_MASK
, 0),
131 .idf
= CLKGEN_FIELD(0x1a8, C28_IDF_MASK
, 25),
133 .odf
= { CLKGEN_FIELD(0x1b0, C28_ODF_MASK
, 8) },
134 .odf_gate
= { CLKGEN_FIELD(0x1ac, 0x1, 28) },
135 .switch2pll_en
= true,
136 .switch2pll
= CLKGEN_FIELD(0x1a4, 0x1, 1),
137 .lock
= &clkgen_a9_lock
,
138 .ops
= &stm_pll4600c28_ops
,
142 * DOC: Clock Generated by PLL, rate set and enabled by bootloader
144 * Traits of this clock:
145 * prepare - clk_(un)prepare only ensures parent is (un)prepared
146 * enable - clk_enable/disable only ensures parent is enabled
147 * rate - rate is fixed. No clk_set_rate support
148 * parent - fixed parent. No clk_set_parent support
152 * PLL clock that is integrated in the ClockGenA instances on the STiH415
155 * @hw: handle between common and hardware-specific interfaces.
156 * @type: PLL instance type.
157 * @regs_base: base of the PLL configuration register(s).
162 struct clkgen_pll_data
*data
;
163 void __iomem
*regs_base
;
172 #define to_clkgen_pll(_hw) container_of(_hw, struct clkgen_pll, hw)
184 static int clkgen_pll_is_locked(struct clk_hw
*hw
)
186 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
187 u32 locked
= CLKGEN_READ(pll
, locked_status
);
192 static int clkgen_pll_is_enabled(struct clk_hw
*hw
)
194 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
195 u32 poweroff
= CLKGEN_READ(pll
, pdn_status
);
199 static int __clkgen_pll_enable(struct clk_hw
*hw
)
201 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
202 void __iomem
*base
= pll
->regs_base
;
203 struct clkgen_field
*field
= &pll
->data
->locked_status
;
207 if (clkgen_pll_is_enabled(hw
))
210 CLKGEN_WRITE(pll
, pdn_ctrl
, 0);
212 ret
= readl_relaxed_poll_timeout(base
+ field
->offset
, reg
,
213 !!((reg
>> field
->shift
) & field
->mask
), 0, 10000);
216 if (pll
->data
->switch2pll_en
)
217 CLKGEN_WRITE(pll
, switch2pll
, 0);
219 pr_debug("%s:%s enabled\n", __clk_get_name(hw
->clk
), __func__
);
225 static int clkgen_pll_enable(struct clk_hw
*hw
)
227 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
228 unsigned long flags
= 0;
232 spin_lock_irqsave(pll
->lock
, flags
);
234 ret
= __clkgen_pll_enable(hw
);
237 spin_unlock_irqrestore(pll
->lock
, flags
);
242 static void __clkgen_pll_disable(struct clk_hw
*hw
)
244 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
246 if (!clkgen_pll_is_enabled(hw
))
249 if (pll
->data
->switch2pll_en
)
250 CLKGEN_WRITE(pll
, switch2pll
, 1);
252 CLKGEN_WRITE(pll
, pdn_ctrl
, 1);
254 pr_debug("%s:%s disabled\n", __clk_get_name(hw
->clk
), __func__
);
257 static void clkgen_pll_disable(struct clk_hw
*hw
)
259 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
260 unsigned long flags
= 0;
263 spin_lock_irqsave(pll
->lock
, flags
);
265 __clkgen_pll_disable(hw
);
268 spin_unlock_irqrestore(pll
->lock
, flags
);
271 static int clk_pll3200c32_get_params(unsigned long input
, unsigned long output
,
275 unsigned long deviation
= ~0;
276 unsigned long new_freq
;
278 /* Charge pump table: highest ndiv value for cp=6 to 25 */
279 static const unsigned char cp_table
[] = {
280 48, 56, 64, 72, 80, 88, 96, 104, 112, 120,
281 128, 136, 144, 152, 160, 168, 176, 184, 192
284 /* Output clock range: 800Mhz to 1600Mhz */
285 if (output
< 800000000 || output
> 1600000000)
291 for (i
= 1; i
<= 7 && deviation
; i
++) {
292 n
= i
* output
/ (2 * input
);
300 new_freq
= (input
* 2 * n
) / i
;
302 new_deviation
= abs(new_freq
- output
);
304 if (!new_deviation
|| new_deviation
< deviation
) {
307 deviation
= new_deviation
;
311 if (deviation
== ~0) /* No solution found */
314 /* Computing recommended charge pump value */
315 for (pll
->cp
= 6; pll
->ndiv
> cp_table
[pll
->cp
-6]; (pll
->cp
)++)
321 static int clk_pll3200c32_get_rate(unsigned long input
, struct stm_pll
*pll
,
327 *rate
= ((2 * (input
/ 1000) * pll
->ndiv
) / pll
->idf
) * 1000;
332 static unsigned long recalc_stm_pll3200c32(struct clk_hw
*hw
,
333 unsigned long parent_rate
)
335 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
336 unsigned long ndiv
, idf
;
337 unsigned long rate
= 0;
339 if (!clkgen_pll_is_enabled(hw
) || !clkgen_pll_is_locked(hw
))
342 ndiv
= CLKGEN_READ(pll
, ndiv
);
343 idf
= CLKGEN_READ(pll
, idf
);
346 /* Note: input is divided to avoid overflow */
347 rate
= ((2 * (parent_rate
/1000) * ndiv
) / idf
) * 1000;
349 pr_debug("%s:%s rate %lu\n", clk_hw_get_name(hw
), __func__
, rate
);
354 static long round_rate_stm_pll3200c32(struct clk_hw
*hw
, unsigned long rate
,
355 unsigned long *prate
)
357 struct stm_pll params
;
359 if (!clk_pll3200c32_get_params(*prate
, rate
, ¶ms
))
360 clk_pll3200c32_get_rate(*prate
, ¶ms
, &rate
);
362 pr_debug("%s: %s rate %ld Invalid\n", __func__
,
363 __clk_get_name(hw
->clk
), rate
);
367 pr_debug("%s: %s new rate %ld [ndiv=%u] [idf=%u]\n",
368 __func__
, __clk_get_name(hw
->clk
),
369 rate
, (unsigned int)params
.ndiv
,
370 (unsigned int)params
.idf
);
375 static int set_rate_stm_pll3200c32(struct clk_hw
*hw
, unsigned long rate
,
376 unsigned long parent_rate
)
378 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
379 struct stm_pll params
;
381 unsigned long flags
= 0;
383 if (!rate
|| !parent_rate
)
386 if (!clk_pll3200c32_get_params(parent_rate
, rate
, ¶ms
))
387 clk_pll3200c32_get_rate(parent_rate
, ¶ms
, &hwrate
);
389 pr_debug("%s: %s new rate %ld [ndiv=0x%x] [idf=0x%x]\n",
390 __func__
, __clk_get_name(hw
->clk
),
391 hwrate
, (unsigned int)params
.ndiv
,
392 (unsigned int)params
.idf
);
397 pll
->ndiv
= params
.ndiv
;
398 pll
->idf
= params
.idf
;
401 __clkgen_pll_disable(hw
);
404 spin_lock_irqsave(pll
->lock
, flags
);
406 CLKGEN_WRITE(pll
, ndiv
, pll
->ndiv
);
407 CLKGEN_WRITE(pll
, idf
, pll
->idf
);
408 CLKGEN_WRITE(pll
, cp
, pll
->cp
);
411 spin_unlock_irqrestore(pll
->lock
, flags
);
413 __clkgen_pll_enable(hw
);
418 /* PLL output structure
419 * FVCO >> /2 >> FVCOBY2 (no output)
420 * |> Divider (ODF) >> PHI
422 * FVCOby2 output = (input * 2 * NDIV) / IDF (assuming FRAC_CONTROL==L)
425 * 4Mhz <= INFF input <= 350Mhz
426 * 4Mhz <= INFIN (INFF / IDF) <= 50Mhz
427 * 19.05Mhz <= FVCOby2 output (PHI w ODF=1) <= 3000Mhz
428 * 1 <= i (register/dec value for IDF) <= 7
429 * 8 <= n (register/dec value for NDIV) <= 246
432 static int clk_pll4600c28_get_params(unsigned long input
, unsigned long output
,
436 unsigned long i
, infin
, n
;
437 unsigned long deviation
= ~0;
438 unsigned long new_freq
, new_deviation
;
440 /* Output clock range: 19Mhz to 3000Mhz */
441 if (output
< 19000000 || output
> 3000000000u)
444 /* For better jitter, IDF should be smallest and NDIV must be maximum */
445 for (i
= 1; i
<= 7 && deviation
; i
++) {
448 if (infin
< 4000000 || infin
> 50000000)
449 continue; /* Invalid case */
451 n
= output
/ (infin
* 2);
452 if (n
< 8 || n
> 246)
453 continue; /* Invalid case */
455 n
++; /* To work around 'y' when n=x.y */
457 for (; n
>= 8 && deviation
; n
--) {
458 new_freq
= infin
* 2 * n
;
459 if (new_freq
< output
)
460 break; /* Optimization: shorting loop */
462 new_deviation
= new_freq
- output
;
463 if (!new_deviation
|| new_deviation
< deviation
) {
466 deviation
= new_deviation
;
471 if (deviation
== ~0) /* No solution found */
477 static int clk_pll4600c28_get_rate(unsigned long input
, struct stm_pll
*pll
,
483 *rate
= (input
/ pll
->idf
) * 2 * pll
->ndiv
;
488 static unsigned long recalc_stm_pll4600c28(struct clk_hw
*hw
,
489 unsigned long parent_rate
)
491 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
492 struct stm_pll params
;
495 if (!clkgen_pll_is_enabled(hw
) || !clkgen_pll_is_locked(hw
))
498 params
.ndiv
= CLKGEN_READ(pll
, ndiv
);
499 params
.idf
= CLKGEN_READ(pll
, idf
);
501 clk_pll4600c28_get_rate(parent_rate
, ¶ms
, &rate
);
503 pr_debug("%s:%s rate %lu\n", __clk_get_name(hw
->clk
), __func__
, rate
);
508 static long round_rate_stm_pll4600c28(struct clk_hw
*hw
, unsigned long rate
,
509 unsigned long *prate
)
511 struct stm_pll params
;
513 if (!clk_pll4600c28_get_params(*prate
, rate
, ¶ms
)) {
514 clk_pll4600c28_get_rate(*prate
, ¶ms
, &rate
);
516 pr_debug("%s: %s rate %ld Invalid\n", __func__
,
517 __clk_get_name(hw
->clk
), rate
);
521 pr_debug("%s: %s new rate %ld [ndiv=%u] [idf=%u]\n",
522 __func__
, __clk_get_name(hw
->clk
),
523 rate
, (unsigned int)params
.ndiv
,
524 (unsigned int)params
.idf
);
529 static int set_rate_stm_pll4600c28(struct clk_hw
*hw
, unsigned long rate
,
530 unsigned long parent_rate
)
532 struct clkgen_pll
*pll
= to_clkgen_pll(hw
);
533 struct stm_pll params
;
535 unsigned long flags
= 0;
537 if (!rate
|| !parent_rate
)
540 if (!clk_pll4600c28_get_params(parent_rate
, rate
, ¶ms
)) {
541 clk_pll4600c28_get_rate(parent_rate
, ¶ms
, &hwrate
);
543 pr_debug("%s: %s rate %ld Invalid\n", __func__
,
544 __clk_get_name(hw
->clk
), rate
);
548 pr_debug("%s: %s new rate %ld [ndiv=0x%x] [idf=0x%x]\n",
549 __func__
, __clk_get_name(hw
->clk
),
550 hwrate
, (unsigned int)params
.ndiv
,
551 (unsigned int)params
.idf
);
556 pll
->ndiv
= params
.ndiv
;
557 pll
->idf
= params
.idf
;
559 __clkgen_pll_disable(hw
);
562 spin_lock_irqsave(pll
->lock
, flags
);
564 CLKGEN_WRITE(pll
, ndiv
, pll
->ndiv
);
565 CLKGEN_WRITE(pll
, idf
, pll
->idf
);
568 spin_unlock_irqrestore(pll
->lock
, flags
);
570 __clkgen_pll_enable(hw
);
575 static const struct clk_ops stm_pll3200c32_ops
= {
576 .enable
= clkgen_pll_enable
,
577 .disable
= clkgen_pll_disable
,
578 .is_enabled
= clkgen_pll_is_enabled
,
579 .recalc_rate
= recalc_stm_pll3200c32
,
582 static const struct clk_ops stm_pll3200c32_a9_ops
= {
583 .enable
= clkgen_pll_enable
,
584 .disable
= clkgen_pll_disable
,
585 .is_enabled
= clkgen_pll_is_enabled
,
586 .recalc_rate
= recalc_stm_pll3200c32
,
587 .round_rate
= round_rate_stm_pll3200c32
,
588 .set_rate
= set_rate_stm_pll3200c32
,
591 static const struct clk_ops stm_pll4600c28_ops
= {
592 .enable
= clkgen_pll_enable
,
593 .disable
= clkgen_pll_disable
,
594 .is_enabled
= clkgen_pll_is_enabled
,
595 .recalc_rate
= recalc_stm_pll4600c28
,
596 .round_rate
= round_rate_stm_pll4600c28
,
597 .set_rate
= set_rate_stm_pll4600c28
,
600 static struct clk
* __init
clkgen_pll_register(const char *parent_name
,
601 struct clkgen_pll_data
*pll_data
,
602 void __iomem
*reg
, unsigned long pll_flags
,
603 const char *clk_name
, spinlock_t
*lock
)
605 struct clkgen_pll
*pll
;
607 struct clk_init_data init
;
609 pll
= kzalloc(sizeof(*pll
), GFP_KERNEL
);
611 return ERR_PTR(-ENOMEM
);
613 init
.name
= clk_name
;
614 init
.ops
= pll_data
->ops
;
616 init
.flags
= pll_flags
| CLK_IS_BASIC
| CLK_GET_RATE_NOCACHE
;
617 init
.parent_names
= &parent_name
;
618 init
.num_parents
= 1;
620 pll
->data
= pll_data
;
621 pll
->regs_base
= reg
;
622 pll
->hw
.init
= &init
;
625 clk
= clk_register(NULL
, &pll
->hw
);
631 pr_debug("%s: parent %s rate %lu\n",
633 __clk_get_name(clk_get_parent(clk
)),
639 static void __iomem
* __init
clkgen_get_register_base(
640 struct device_node
*np
)
642 struct device_node
*pnode
;
643 void __iomem
*reg
= NULL
;
645 pnode
= of_get_parent(np
);
649 reg
= of_iomap(pnode
, 0);
655 static struct clk
* __init
clkgen_odf_register(const char *parent_name
,
657 struct clkgen_pll_data
*pll_data
,
658 unsigned long pll_flags
, int odf
,
659 spinlock_t
*odf_lock
,
660 const char *odf_name
)
664 struct clk_gate
*gate
;
665 struct clk_divider
*div
;
667 flags
= pll_flags
| CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
;
669 gate
= kzalloc(sizeof(*gate
), GFP_KERNEL
);
671 return ERR_PTR(-ENOMEM
);
673 gate
->flags
= CLK_GATE_SET_TO_DISABLE
;
674 gate
->reg
= reg
+ pll_data
->odf_gate
[odf
].offset
;
675 gate
->bit_idx
= pll_data
->odf_gate
[odf
].shift
;
676 gate
->lock
= odf_lock
;
678 div
= kzalloc(sizeof(*div
), GFP_KERNEL
);
681 return ERR_PTR(-ENOMEM
);
684 div
->flags
= CLK_DIVIDER_ONE_BASED
| CLK_DIVIDER_ALLOW_ZERO
;
685 div
->reg
= reg
+ pll_data
->odf
[odf
].offset
;
686 div
->shift
= pll_data
->odf
[odf
].shift
;
687 div
->width
= fls(pll_data
->odf
[odf
].mask
);
688 div
->lock
= odf_lock
;
690 clk
= clk_register_composite(NULL
, odf_name
, &parent_name
, 1,
692 &div
->hw
, &clk_divider_ops
,
693 &gate
->hw
, &clk_gate_ops
,
698 pr_debug("%s: parent %s rate %lu\n",
700 __clk_get_name(clk_get_parent(clk
)),
706 static void __init
clkgen_c32_pll_setup(struct device_node
*np
,
707 struct clkgen_pll_data
*data
)
710 const char *parent_name
, *pll_name
;
711 void __iomem
*pll_base
;
713 struct clk_onecell_data
*clk_data
;
714 unsigned long pll_flags
= 0;
717 parent_name
= of_clk_get_parent_name(np
, 0);
721 pll_base
= clkgen_get_register_base(np
);
725 of_clk_detect_critical(np
, 0, &pll_flags
);
727 clk
= clkgen_pll_register(parent_name
, data
, pll_base
, pll_flags
,
728 np
->name
, data
->lock
);
732 pll_name
= __clk_get_name(clk
);
734 num_odfs
= data
->num_odfs
;
736 clk_data
= kzalloc(sizeof(*clk_data
), GFP_KERNEL
);
740 clk_data
->clk_num
= num_odfs
;
741 clk_data
->clks
= kcalloc(clk_data
->clk_num
, sizeof(struct clk
*),
747 for (odf
= 0; odf
< num_odfs
; odf
++) {
749 const char *clk_name
;
750 unsigned long odf_flags
= 0;
752 if (of_property_read_string_index(np
, "clock-output-names",
756 of_clk_detect_critical(np
, odf
, &odf_flags
);
758 clk
= clkgen_odf_register(pll_name
, pll_base
, data
, odf_flags
,
759 odf
, &clkgena_c32_odf_lock
, clk_name
);
763 clk_data
->clks
[odf
] = clk
;
766 of_clk_add_provider(np
, of_clk_src_onecell_get
, clk_data
);
771 kfree(clk_data
->clks
);
774 static void __init
clkgen_c32_pll0_setup(struct device_node
*np
)
776 clkgen_c32_pll_setup(np
,
777 (struct clkgen_pll_data
*) &st_pll3200c32_cx_0
);
779 CLK_OF_DECLARE(c32_pll0
, "st,clkgen-pll0", clkgen_c32_pll0_setup
);
781 static void __init
clkgen_c32_pll1_setup(struct device_node
*np
)
783 clkgen_c32_pll_setup(np
,
784 (struct clkgen_pll_data
*) &st_pll3200c32_cx_1
);
786 CLK_OF_DECLARE(c32_pll1
, "st,clkgen-pll1", clkgen_c32_pll1_setup
);
788 static void __init
clkgen_c32_plla9_setup(struct device_node
*np
)
790 clkgen_c32_pll_setup(np
,
791 (struct clkgen_pll_data
*) &st_pll3200c32_407_a9
);
793 CLK_OF_DECLARE(c32_plla9
, "st,stih407-clkgen-plla9", clkgen_c32_plla9_setup
);
795 static void __init
clkgen_c28_plla9_setup(struct device_node
*np
)
797 clkgen_c32_pll_setup(np
,
798 (struct clkgen_pll_data
*) &st_pll4600c28_418_a9
);
800 CLK_OF_DECLARE(c28_plla9
, "st,stih418-clkgen-plla9", clkgen_c28_plla9_setup
);