2 * common clks module for all SiRF SoCs
4 * Copyright (c) 2011 - 2014 Cambridge Silicon Radio Limited, a CSR plc group
7 * Licensed under GPLv2 or later.
10 #include <linux/clk.h>
13 #define MHZ (KHZ * KHZ)
15 static void __iomem *sirfsoc_clk_vbase;
16 static void __iomem *sirfsoc_rsc_vbase;
17 static struct clk_onecell_data clk_data;
20 * SiRFprimaII clock controller
21 * - 2 oscillators: osc-26MHz, rtc-32.768KHz
22 * - 3 standard configurable plls: pll1, pll2 & pll3
23 * - 2 exclusive plls: usb phy pll and sata phy pll
24 * - 8 clock domains: cpu/cpudiv, mem/memdiv, sys/io, dsp, graphic, multimedia,
26 * Each clock domain can select its own clock source from five clock sources,
27 * X_XIN, X_XINW, PLL1, PLL2 and PLL3. The domain clock is used as the source
28 * clock of the group clock.
29 * - dsp domain: gps, mf
30 * - io domain: dmac, nand, audio, uart, i2c, spi, usp, pwm, pulse
31 * - sys domain: security
36 unsigned short regofs; /* register offset */
39 #define to_pllclk(_hw) container_of(_hw, struct clk_pll, hw)
43 signed char enable_bit; /* enable bit: 0 ~ 63 */
44 unsigned short regofs; /* register offset */
47 #define to_dmnclk(_hw) container_of(_hw, struct clk_dmn, hw)
51 signed char enable_bit; /* enable bit: 0 ~ 63 */
54 #define to_stdclk(_hw) container_of(_hw, struct clk_std, hw)
56 static int std_clk_is_enabled(struct clk_hw *hw);
57 static int std_clk_enable(struct clk_hw *hw);
58 static void std_clk_disable(struct clk_hw *hw);
60 static inline unsigned long clkc_readl(unsigned reg)
62 return readl(sirfsoc_clk_vbase + reg);
65 static inline void clkc_writel(u32 val, unsigned reg)
67 writel(val, sirfsoc_clk_vbase + reg);
74 static unsigned long pll_clk_recalc_rate(struct clk_hw *hw,
75 unsigned long parent_rate)
77 unsigned long fin = parent_rate;
78 struct clk_pll *clk = to_pllclk(hw);
79 u32 regcfg2 = clk->regofs + SIRFSOC_CLKC_PLL1_CFG2 -
80 SIRFSOC_CLKC_PLL1_CFG0;
82 if (clkc_readl(regcfg2) & BIT(2)) {
86 /* fout = fin * nf / nr / od */
87 u32 cfg0 = clkc_readl(clk->regofs);
88 u32 nf = (cfg0 & (BIT(13) - 1)) + 1;
89 u32 nr = ((cfg0 >> 13) & (BIT(6) - 1)) + 1;
90 u32 od = ((cfg0 >> 19) & (BIT(4) - 1)) + 1;
92 return fin / MHZ * nf / nr / od * MHZ;
96 static long pll_clk_round_rate(struct clk_hw *hw, unsigned long rate,
97 unsigned long *parent_rate)
99 unsigned long fin, nf, nr, od;
103 * fout = fin * nf / (nr * od);
104 * set od = 1, nr = fin/MHz, so fout = nf * MHz
106 rate = rate - rate % MHZ;
121 dividend = (u64)fin * nf;
122 do_div(dividend, nr * od);
124 return (long)dividend;
127 static int pll_clk_set_rate(struct clk_hw *hw, unsigned long rate,
128 unsigned long parent_rate)
130 struct clk_pll *clk = to_pllclk(hw);
131 unsigned long fin, nf, nr, od, reg;
134 * fout = fin * nf / (nr * od);
135 * set od = 1, nr = fin/MHz, so fout = nf * MHz
139 if (unlikely((rate % MHZ) || nf > BIT(13) || nf < 1))
146 BUG_ON((fin % MHZ) || nr > BIT(6));
150 reg = (nf - 1) | ((nr - 1) << 13) | ((od - 1) << 19);
151 clkc_writel(reg, clk->regofs);
153 reg = clk->regofs + SIRFSOC_CLKC_PLL1_CFG1 - SIRFSOC_CLKC_PLL1_CFG0;
154 clkc_writel((nf >> 1) - 1, reg);
156 reg = clk->regofs + SIRFSOC_CLKC_PLL1_CFG2 - SIRFSOC_CLKC_PLL1_CFG0;
157 while (!(clkc_readl(reg) & BIT(6)))
163 static long cpu_clk_round_rate(struct clk_hw *hw, unsigned long rate,
164 unsigned long *parent_rate)
167 * SiRF SoC has not cpu clock control,
168 * So bypass to it's parent pll.
170 struct clk_hw *parent_clk = clk_hw_get_parent(hw);
171 struct clk_hw *pll_parent_clk = clk_hw_get_parent(parent_clk);
172 unsigned long pll_parent_rate = clk_hw_get_rate(pll_parent_clk);
173 return pll_clk_round_rate(parent_clk, rate, &pll_parent_rate);
176 static unsigned long cpu_clk_recalc_rate(struct clk_hw *hw,
177 unsigned long parent_rate)
180 * SiRF SoC has not cpu clock control,
181 * So return the parent pll rate.
183 struct clk_hw *parent_clk = clk_hw_get_parent(hw);
184 return clk_hw_get_rate(parent_clk);
187 static const struct clk_ops std_pll_ops = {
188 .recalc_rate = pll_clk_recalc_rate,
189 .round_rate = pll_clk_round_rate,
190 .set_rate = pll_clk_set_rate,
193 static const char * const pll_clk_parents[] = {
197 static const struct clk_init_data clk_pll1_init = {
200 .parent_names = pll_clk_parents,
201 .num_parents = ARRAY_SIZE(pll_clk_parents),
204 static const struct clk_init_data clk_pll2_init = {
207 .parent_names = pll_clk_parents,
208 .num_parents = ARRAY_SIZE(pll_clk_parents),
211 static const struct clk_init_data clk_pll3_init = {
214 .parent_names = pll_clk_parents,
215 .num_parents = ARRAY_SIZE(pll_clk_parents),
218 static struct clk_pll clk_pll1 = {
219 .regofs = SIRFSOC_CLKC_PLL1_CFG0,
221 .init = &clk_pll1_init,
225 static struct clk_pll clk_pll2 = {
226 .regofs = SIRFSOC_CLKC_PLL2_CFG0,
228 .init = &clk_pll2_init,
232 static struct clk_pll clk_pll3 = {
233 .regofs = SIRFSOC_CLKC_PLL3_CFG0,
235 .init = &clk_pll3_init,
240 * usb uses specified pll
243 static int usb_pll_clk_enable(struct clk_hw *hw)
245 u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
246 reg &= ~(SIRFSOC_USBPHY_PLL_POWERDOWN | SIRFSOC_USBPHY_PLL_BYPASS);
247 writel(reg, sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
248 while (!(readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL) &
249 SIRFSOC_USBPHY_PLL_LOCK))
255 static void usb_pll_clk_disable(struct clk_hw *clk)
257 u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
258 reg |= (SIRFSOC_USBPHY_PLL_POWERDOWN | SIRFSOC_USBPHY_PLL_BYPASS);
259 writel(reg, sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
262 static unsigned long usb_pll_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
264 u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL);
265 return (reg & SIRFSOC_USBPHY_PLL_BYPASS) ? parent_rate : 48*MHZ;
268 static const struct clk_ops usb_pll_ops = {
269 .enable = usb_pll_clk_enable,
270 .disable = usb_pll_clk_disable,
271 .recalc_rate = usb_pll_clk_recalc_rate,
274 static const struct clk_init_data clk_usb_pll_init = {
277 .parent_names = pll_clk_parents,
278 .num_parents = ARRAY_SIZE(pll_clk_parents),
281 static struct clk_hw usb_pll_clk_hw = {
282 .init = &clk_usb_pll_init,
286 * clock domains - cpu, mem, sys/io, dsp, gfx
289 static const char * const dmn_clk_parents[] = {
297 static u8 dmn_clk_get_parent(struct clk_hw *hw)
299 struct clk_dmn *clk = to_dmnclk(hw);
300 u32 cfg = clkc_readl(clk->regofs);
302 /* parent of io domain can only be pll3 */
303 if (strcmp(hw->init->name, "io") == 0)
306 WARN_ON((cfg & (BIT(3) - 1)) > 4);
308 return cfg & (BIT(3) - 1);
311 static int dmn_clk_set_parent(struct clk_hw *hw, u8 parent)
313 struct clk_dmn *clk = to_dmnclk(hw);
314 u32 cfg = clkc_readl(clk->regofs);
316 /* parent of io domain can only be pll3 */
317 if (strcmp(hw->init->name, "io") == 0)
320 cfg &= ~(BIT(3) - 1);
321 clkc_writel(cfg | parent, clk->regofs);
322 /* BIT(3) - switching status: 1 - busy, 0 - done */
323 while (clkc_readl(clk->regofs) & BIT(3))
329 static unsigned long dmn_clk_recalc_rate(struct clk_hw *hw,
330 unsigned long parent_rate)
333 unsigned long fin = parent_rate;
334 struct clk_dmn *clk = to_dmnclk(hw);
336 u32 cfg = clkc_readl(clk->regofs);
339 /* fcd bypass mode */
343 * wait count: bit[19:16], hold count: bit[23:20]
345 u32 wait = (cfg >> 16) & (BIT(4) - 1);
346 u32 hold = (cfg >> 20) & (BIT(4) - 1);
348 return fin / (wait + hold + 2);
352 static long dmn_clk_round_rate(struct clk_hw *hw, unsigned long rate,
353 unsigned long *parent_rate)
356 unsigned ratio, wait, hold;
357 unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4;
364 if (ratio > BIT(bits + 1))
365 ratio = BIT(bits + 1);
367 wait = (ratio >> 1) - 1;
368 hold = ratio - wait - 2;
370 return fin / (wait + hold + 2);
373 static int dmn_clk_set_rate(struct clk_hw *hw, unsigned long rate,
374 unsigned long parent_rate)
376 struct clk_dmn *clk = to_dmnclk(hw);
378 unsigned ratio, wait, hold, reg;
379 unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4;
384 if (unlikely(ratio < 2 || ratio > BIT(bits + 1)))
389 wait = (ratio >> 1) - 1;
390 hold = ratio - wait - 2;
392 reg = clkc_readl(clk->regofs);
393 reg &= ~(((BIT(bits) - 1) << 16) | ((BIT(bits) - 1) << 20));
394 reg |= (wait << 16) | (hold << 20) | BIT(25);
395 clkc_writel(reg, clk->regofs);
397 /* waiting FCD been effective */
398 while (clkc_readl(clk->regofs) & BIT(25))
404 static int cpu_clk_set_rate(struct clk_hw *hw, unsigned long rate,
405 unsigned long parent_rate)
408 struct clk *cur_parent;
410 if (rate == clk_get_rate(clk_pll1.hw.clk)) {
411 ret1 = clk_set_parent(hw->clk, clk_pll1.hw.clk);
415 if (rate == clk_get_rate(clk_pll2.hw.clk)) {
416 ret1 = clk_set_parent(hw->clk, clk_pll2.hw.clk);
420 if (rate == clk_get_rate(clk_pll3.hw.clk)) {
421 ret1 = clk_set_parent(hw->clk, clk_pll3.hw.clk);
425 cur_parent = clk_get_parent(hw->clk);
427 /* switch to tmp pll before setting parent clock's rate */
428 if (cur_parent == clk_pll1.hw.clk) {
429 ret1 = clk_set_parent(hw->clk, clk_pll2.hw.clk);
433 ret2 = clk_set_rate(clk_pll1.hw.clk, rate);
435 ret1 = clk_set_parent(hw->clk, clk_pll1.hw.clk);
437 return ret2 ? ret2 : ret1;
440 static const struct clk_ops msi_ops = {
441 .set_rate = dmn_clk_set_rate,
442 .round_rate = dmn_clk_round_rate,
443 .recalc_rate = dmn_clk_recalc_rate,
444 .set_parent = dmn_clk_set_parent,
445 .get_parent = dmn_clk_get_parent,
448 static const struct clk_init_data clk_mem_init = {
451 .parent_names = dmn_clk_parents,
452 .num_parents = ARRAY_SIZE(dmn_clk_parents),
455 static struct clk_dmn clk_mem = {
456 .regofs = SIRFSOC_CLKC_MEM_CFG,
458 .init = &clk_mem_init,
462 static const struct clk_init_data clk_sys_init = {
465 .parent_names = dmn_clk_parents,
466 .num_parents = ARRAY_SIZE(dmn_clk_parents),
467 .flags = CLK_SET_RATE_GATE,
470 static struct clk_dmn clk_sys = {
471 .regofs = SIRFSOC_CLKC_SYS_CFG,
473 .init = &clk_sys_init,
477 static const struct clk_init_data clk_io_init = {
480 .parent_names = dmn_clk_parents,
481 .num_parents = ARRAY_SIZE(dmn_clk_parents),
484 static struct clk_dmn clk_io = {
485 .regofs = SIRFSOC_CLKC_IO_CFG,
487 .init = &clk_io_init,
491 static const struct clk_ops cpu_ops = {
492 .set_parent = dmn_clk_set_parent,
493 .get_parent = dmn_clk_get_parent,
494 .set_rate = cpu_clk_set_rate,
495 .round_rate = cpu_clk_round_rate,
496 .recalc_rate = cpu_clk_recalc_rate,
499 static const struct clk_init_data clk_cpu_init = {
502 .parent_names = dmn_clk_parents,
503 .num_parents = ARRAY_SIZE(dmn_clk_parents),
504 .flags = CLK_SET_RATE_PARENT,
507 static struct clk_dmn clk_cpu = {
508 .regofs = SIRFSOC_CLKC_CPU_CFG,
510 .init = &clk_cpu_init,
514 static const struct clk_ops dmn_ops = {
515 .is_enabled = std_clk_is_enabled,
516 .enable = std_clk_enable,
517 .disable = std_clk_disable,
518 .set_rate = dmn_clk_set_rate,
519 .round_rate = dmn_clk_round_rate,
520 .recalc_rate = dmn_clk_recalc_rate,
521 .set_parent = dmn_clk_set_parent,
522 .get_parent = dmn_clk_get_parent,
525 /* dsp, gfx, mm, lcd and vpp domain */
527 static const struct clk_init_data clk_dsp_init = {
530 .parent_names = dmn_clk_parents,
531 .num_parents = ARRAY_SIZE(dmn_clk_parents),
534 static struct clk_dmn clk_dsp = {
535 .regofs = SIRFSOC_CLKC_DSP_CFG,
538 .init = &clk_dsp_init,
542 static const struct clk_init_data clk_gfx_init = {
545 .parent_names = dmn_clk_parents,
546 .num_parents = ARRAY_SIZE(dmn_clk_parents),
549 static struct clk_dmn clk_gfx = {
550 .regofs = SIRFSOC_CLKC_GFX_CFG,
553 .init = &clk_gfx_init,
557 static const struct clk_init_data clk_mm_init = {
560 .parent_names = dmn_clk_parents,
561 .num_parents = ARRAY_SIZE(dmn_clk_parents),
564 static struct clk_dmn clk_mm = {
565 .regofs = SIRFSOC_CLKC_MM_CFG,
568 .init = &clk_mm_init,
573 * for atlas6, gfx2d holds the bit of prima2's clk_mm
575 #define clk_gfx2d clk_mm
577 static const struct clk_init_data clk_lcd_init = {
580 .parent_names = dmn_clk_parents,
581 .num_parents = ARRAY_SIZE(dmn_clk_parents),
584 static struct clk_dmn clk_lcd = {
585 .regofs = SIRFSOC_CLKC_LCD_CFG,
588 .init = &clk_lcd_init,
592 static const struct clk_init_data clk_vpp_init = {
595 .parent_names = dmn_clk_parents,
596 .num_parents = ARRAY_SIZE(dmn_clk_parents),
599 static struct clk_dmn clk_vpp = {
600 .regofs = SIRFSOC_CLKC_LCD_CFG,
603 .init = &clk_vpp_init,
607 static const struct clk_init_data clk_mmc01_init = {
610 .parent_names = dmn_clk_parents,
611 .num_parents = ARRAY_SIZE(dmn_clk_parents),
614 static const struct clk_init_data clk_mmc23_init = {
617 .parent_names = dmn_clk_parents,
618 .num_parents = ARRAY_SIZE(dmn_clk_parents),
621 static const struct clk_init_data clk_mmc45_init = {
624 .parent_names = dmn_clk_parents,
625 .num_parents = ARRAY_SIZE(dmn_clk_parents),
629 * peripheral controllers in io domain
632 static int std_clk_is_enabled(struct clk_hw *hw)
636 struct clk_std *clk = to_stdclk(hw);
638 bit = clk->enable_bit % 32;
639 reg = clk->enable_bit / 32;
640 reg = SIRFSOC_CLKC_CLK_EN0 + reg * sizeof(reg);
642 return !!(clkc_readl(reg) & BIT(bit));
645 static int std_clk_enable(struct clk_hw *hw)
649 struct clk_std *clk = to_stdclk(hw);
651 BUG_ON(clk->enable_bit < 0 || clk->enable_bit > 63);
653 bit = clk->enable_bit % 32;
654 reg = clk->enable_bit / 32;
655 reg = SIRFSOC_CLKC_CLK_EN0 + reg * sizeof(reg);
657 val = clkc_readl(reg) | BIT(bit);
658 clkc_writel(val, reg);
662 static void std_clk_disable(struct clk_hw *hw)
666 struct clk_std *clk = to_stdclk(hw);
668 BUG_ON(clk->enable_bit < 0 || clk->enable_bit > 63);
670 bit = clk->enable_bit % 32;
671 reg = clk->enable_bit / 32;
672 reg = SIRFSOC_CLKC_CLK_EN0 + reg * sizeof(reg);
674 val = clkc_readl(reg) & ~BIT(bit);
675 clkc_writel(val, reg);
678 static const char * const std_clk_io_parents[] = {
682 static const struct clk_ops ios_ops = {
683 .is_enabled = std_clk_is_enabled,
684 .enable = std_clk_enable,
685 .disable = std_clk_disable,
688 static const struct clk_init_data clk_cphif_init = {
691 .parent_names = std_clk_io_parents,
692 .num_parents = ARRAY_SIZE(std_clk_io_parents),
695 static struct clk_std clk_cphif = {
698 .init = &clk_cphif_init,
702 static const struct clk_init_data clk_dmac0_init = {
705 .parent_names = std_clk_io_parents,
706 .num_parents = ARRAY_SIZE(std_clk_io_parents),
709 static struct clk_std clk_dmac0 = {
712 .init = &clk_dmac0_init,
716 static const struct clk_init_data clk_dmac1_init = {
719 .parent_names = std_clk_io_parents,
720 .num_parents = ARRAY_SIZE(std_clk_io_parents),
723 static struct clk_std clk_dmac1 = {
726 .init = &clk_dmac1_init,
730 static const struct clk_init_data clk_audio_init = {
733 .parent_names = std_clk_io_parents,
734 .num_parents = ARRAY_SIZE(std_clk_io_parents),
737 static struct clk_std clk_audio = {
740 .init = &clk_audio_init,
744 static const struct clk_init_data clk_uart0_init = {
747 .parent_names = std_clk_io_parents,
748 .num_parents = ARRAY_SIZE(std_clk_io_parents),
751 static struct clk_std clk_uart0 = {
754 .init = &clk_uart0_init,
758 static const struct clk_init_data clk_uart1_init = {
761 .parent_names = std_clk_io_parents,
762 .num_parents = ARRAY_SIZE(std_clk_io_parents),
765 static struct clk_std clk_uart1 = {
768 .init = &clk_uart1_init,
772 static const struct clk_init_data clk_uart2_init = {
775 .parent_names = std_clk_io_parents,
776 .num_parents = ARRAY_SIZE(std_clk_io_parents),
779 static struct clk_std clk_uart2 = {
782 .init = &clk_uart2_init,
786 static const struct clk_init_data clk_usp0_init = {
789 .parent_names = std_clk_io_parents,
790 .num_parents = ARRAY_SIZE(std_clk_io_parents),
793 static struct clk_std clk_usp0 = {
796 .init = &clk_usp0_init,
800 static const struct clk_init_data clk_usp1_init = {
803 .parent_names = std_clk_io_parents,
804 .num_parents = ARRAY_SIZE(std_clk_io_parents),
807 static struct clk_std clk_usp1 = {
810 .init = &clk_usp1_init,
814 static const struct clk_init_data clk_usp2_init = {
817 .parent_names = std_clk_io_parents,
818 .num_parents = ARRAY_SIZE(std_clk_io_parents),
821 static struct clk_std clk_usp2 = {
824 .init = &clk_usp2_init,
828 static const struct clk_init_data clk_vip_init = {
831 .parent_names = std_clk_io_parents,
832 .num_parents = ARRAY_SIZE(std_clk_io_parents),
835 static struct clk_std clk_vip = {
838 .init = &clk_vip_init,
842 static const struct clk_init_data clk_spi0_init = {
845 .parent_names = std_clk_io_parents,
846 .num_parents = ARRAY_SIZE(std_clk_io_parents),
849 static struct clk_std clk_spi0 = {
852 .init = &clk_spi0_init,
856 static const struct clk_init_data clk_spi1_init = {
859 .parent_names = std_clk_io_parents,
860 .num_parents = ARRAY_SIZE(std_clk_io_parents),
863 static struct clk_std clk_spi1 = {
866 .init = &clk_spi1_init,
870 static const struct clk_init_data clk_tsc_init = {
873 .parent_names = std_clk_io_parents,
874 .num_parents = ARRAY_SIZE(std_clk_io_parents),
877 static struct clk_std clk_tsc = {
880 .init = &clk_tsc_init,
884 static const struct clk_init_data clk_i2c0_init = {
887 .parent_names = std_clk_io_parents,
888 .num_parents = ARRAY_SIZE(std_clk_io_parents),
891 static struct clk_std clk_i2c0 = {
894 .init = &clk_i2c0_init,
898 static const struct clk_init_data clk_i2c1_init = {
901 .parent_names = std_clk_io_parents,
902 .num_parents = ARRAY_SIZE(std_clk_io_parents),
905 static struct clk_std clk_i2c1 = {
908 .init = &clk_i2c1_init,
912 static const struct clk_init_data clk_pwmc_init = {
915 .parent_names = std_clk_io_parents,
916 .num_parents = ARRAY_SIZE(std_clk_io_parents),
919 static struct clk_std clk_pwmc = {
922 .init = &clk_pwmc_init,
926 static const struct clk_init_data clk_efuse_init = {
929 .parent_names = std_clk_io_parents,
930 .num_parents = ARRAY_SIZE(std_clk_io_parents),
933 static struct clk_std clk_efuse = {
936 .init = &clk_efuse_init,
940 static const struct clk_init_data clk_pulse_init = {
943 .parent_names = std_clk_io_parents,
944 .num_parents = ARRAY_SIZE(std_clk_io_parents),
947 static struct clk_std clk_pulse = {
950 .init = &clk_pulse_init,
954 static const char * const std_clk_dsp_parents[] = {
958 static const struct clk_init_data clk_gps_init = {
961 .parent_names = std_clk_dsp_parents,
962 .num_parents = ARRAY_SIZE(std_clk_dsp_parents),
965 static struct clk_std clk_gps = {
968 .init = &clk_gps_init,
972 static const struct clk_init_data clk_mf_init = {
975 .parent_names = std_clk_io_parents,
976 .num_parents = ARRAY_SIZE(std_clk_io_parents),
979 static struct clk_std clk_mf = {
982 .init = &clk_mf_init,
986 static const char * const std_clk_sys_parents[] = {
990 static const struct clk_init_data clk_security_init = {
993 .parent_names = std_clk_sys_parents,
994 .num_parents = ARRAY_SIZE(std_clk_sys_parents),
997 static struct clk_std clk_security = {
1000 .init = &clk_security_init,
1004 static const char * const std_clk_usb_parents[] = {
1008 static const struct clk_init_data clk_usb0_init = {
1011 .parent_names = std_clk_usb_parents,
1012 .num_parents = ARRAY_SIZE(std_clk_usb_parents),
1015 static struct clk_std clk_usb0 = {
1018 .init = &clk_usb0_init,
1022 static const struct clk_init_data clk_usb1_init = {
1025 .parent_names = std_clk_usb_parents,
1026 .num_parents = ARRAY_SIZE(std_clk_usb_parents),
1029 static struct clk_std clk_usb1 = {
1032 .init = &clk_usb1_init,