Lines Matching full:clockgen

11 #include <dt-bindings/clock/fsl,qoriq-clockgen.h>
33 #define CGA_PLL4 4 /* only on clockgen-1.0, which lacks CGB */
65 struct clockgen;
81 void (*init_periph)(struct clockgen *cg);
87 struct clockgen { struct
99 static struct clockgen clockgen; argument
102 static void cg_out(struct clockgen *cg, u32 val, u32 __iomem *reg) in cg_out()
110 static u32 cg_in(struct clockgen *cg, u32 __iomem *reg) in cg_in()
469 static void __init p2041_init_periph(struct clockgen *cg) in p2041_init_periph()
481 static void __init p4080_init_periph(struct clockgen *cg) in p4080_init_periph()
498 static void __init p5020_init_periph(struct clockgen *cg) in p5020_init_periph()
513 static void __init p5040_init_periph(struct clockgen *cg) in p5040_init_periph()
533 static void __init t1023_init_periph(struct clockgen *cg) in t1023_init_periph()
538 static void __init t1040_init_periph(struct clockgen *cg) in t1040_init_periph()
543 static void __init t2080_init_periph(struct clockgen *cg) in t2080_init_periph()
548 static void __init t4240_init_periph(struct clockgen *cg) in t4240_init_periph()
556 .compat = "fsl,b4420-clockgen",
574 .compat = "fsl,b4860-clockgen",
592 .compat = "fsl,ls1021a-clockgen",
603 .compat = "fsl,ls1028a-clockgen",
619 .compat = "fsl,ls1043a-clockgen",
635 .compat = "fsl,ls1046a-clockgen",
651 .compat = "fsl,ls1088a-clockgen",
666 .compat = "fsl,ls1012a-clockgen",
676 .compat = "fsl,ls2080a-clockgen",
689 .compat = "fsl,lx2160a-clockgen",
702 .compat = "fsl,p2041-clockgen",
715 .compat = "fsl,p3041-clockgen",
728 .compat = "fsl,p4080-clockgen",
742 .compat = "fsl,p5020-clockgen",
755 .compat = "fsl,p5040-clockgen",
768 .compat = "fsl,t1023-clockgen",
784 .compat = "fsl,t1040-clockgen",
798 .compat = "fsl,t2080-clockgen",
815 .compat = "fsl,t4240-clockgen",
837 struct clockgen *cg;
894 static const struct clockgen_pll_div *get_pll_div(struct clockgen *cg, in get_pll_div()
909 static struct clk * __init create_mux_common(struct clockgen *cg, in create_mux_common()
970 static struct clk * __init create_one_cmux(struct clockgen *cg, int idx) in create_one_cmux()
1018 static struct clk * __init create_one_hwaccel(struct clockgen *cg, int idx) in create_one_hwaccel()
1033 static void __init create_muxes(struct clockgen *cg) in create_muxes()
1060 * Legacy nodes may get probed before the parent clockgen node.
1067 if (!clockgen.node) { in legacy_init_clockgen()
1089 clk = clockgen.cmux[idx]; in core_mux_init()
1130 clk = of_clk_get_by_name(clockgen.node, dtname); in input_clock_by_name()
1141 clk = of_clk_get(clockgen.node, 0); in input_clock_by_index()
1153 clk = sysclk_from_fixed(clockgen.node, name); in create_sysclk()
1165 sysclk = of_get_child_by_name(clockgen.node, "sysclk"); in create_sysclk()
1204 clk = clockgen.sysclk; in sysclk_init()
1211 static void __init create_one_pll(struct clockgen *cg, int idx) in create_one_pll()
1303 static void __init create_plls(struct clockgen *cg) in create_plls()
1320 pll = &clockgen.pll[idx]; in legacy_pll_init()
1389 struct clockgen *cg = data; in clockgen_clk_get()
1497 if (clockgen.node) in _clockgen_init()
1500 clockgen.node = np; in _clockgen_init()
1501 clockgen.regs = of_iomap(np, 0); in _clockgen_init()
1502 if (!clockgen.regs && in _clockgen_init()
1505 clockgen.regs = ioremap(0x1ee1000, 0x1000); in _clockgen_init()
1508 if (!clockgen.regs) { in _clockgen_init()
1517 !strcmp(chipinfo[i].compat, "fsl,ls1021a-clockgen")) in _clockgen_init()
1522 pr_err("%s: unknown clockgen node %pOF\n", __func__, np); in _clockgen_init()
1525 clockgen.info = chipinfo[i]; in _clockgen_init()
1527 if (clockgen.info.guts_compat) { in _clockgen_init()
1531 clockgen.info.guts_compat); in _clockgen_init()
1533 clockgen.guts = of_iomap(guts, 0); in _clockgen_init()
1534 if (!clockgen.guts) { in _clockgen_init()
1544 clockgen.info.flags |= CG_CMUX_GE_PLAT; in _clockgen_init()
1546 clockgen.sysclk = create_sysclk("cg-sysclk"); in _clockgen_init()
1547 clockgen.coreclk = create_coreclk("cg-coreclk"); in _clockgen_init()
1548 create_plls(&clockgen); in _clockgen_init()
1549 create_muxes(&clockgen); in _clockgen_init()
1551 if (clockgen.info.init_periph) in _clockgen_init()
1552 clockgen.info.init_periph(&clockgen); in _clockgen_init()
1554 ret = of_clk_add_provider(np, clockgen_clk_get, &clockgen); in _clockgen_init()
1560 /* Don't create cpufreq device for legacy clockgen blocks */ in _clockgen_init()
1565 iounmap(clockgen.regs); in _clockgen_init()
1566 clockgen.regs = NULL; in _clockgen_init()
1589 CLK_OF_DECLARE(qoriq_clockgen_1, "fsl,qoriq-clockgen-1.0", clockgen_init);
1590 CLK_OF_DECLARE(qoriq_clockgen_2, "fsl,qoriq-clockgen-2.0", clockgen_init);
1591 CLK_OF_DECLARE(qoriq_clockgen_b4420, "fsl,b4420-clockgen", clockgen_init);
1592 CLK_OF_DECLARE(qoriq_clockgen_b4860, "fsl,b4860-clockgen", clockgen_init);
1593 CLK_OF_DECLARE(qoriq_clockgen_ls1012a, "fsl,ls1012a-clockgen", clockgen_init);
1594 CLK_OF_DECLARE(qoriq_clockgen_ls1021a, "fsl,ls1021a-clockgen", clockgen_init);
1595 CLK_OF_DECLARE(qoriq_clockgen_ls1028a, "fsl,ls1028a-clockgen", clockgen_init);
1596 CLK_OF_DECLARE(qoriq_clockgen_ls1043a, "fsl,ls1043a-clockgen", clockgen_init);
1597 CLK_OF_DECLARE(qoriq_clockgen_ls1046a, "fsl,ls1046a-clockgen", clockgen_init);
1598 CLK_OF_DECLARE(qoriq_clockgen_ls1088a, "fsl,ls1088a-clockgen", clockgen_init);
1599 CLK_OF_DECLARE(qoriq_clockgen_ls2080a, "fsl,ls2080a-clockgen", clockgen_init);
1600 CLK_OF_DECLARE(qoriq_clockgen_lx2160a, "fsl,lx2160a-clockgen", clockgen_init);
1601 CLK_OF_DECLARE(qoriq_clockgen_p2041, "fsl,p2041-clockgen", clockgen_init);
1602 CLK_OF_DECLARE(qoriq_clockgen_p3041, "fsl,p3041-clockgen", clockgen_init);
1603 CLK_OF_DECLARE(qoriq_clockgen_p4080, "fsl,p4080-clockgen", clockgen_init);
1604 CLK_OF_DECLARE(qoriq_clockgen_p5020, "fsl,p5020-clockgen", clockgen_init);
1605 CLK_OF_DECLARE(qoriq_clockgen_p5040, "fsl,p5040-clockgen", clockgen_init);
1606 CLK_OF_DECLARE(qoriq_clockgen_t1023, "fsl,t1023-clockgen", clockgen_init);
1607 CLK_OF_DECLARE(qoriq_clockgen_t1040, "fsl,t1040-clockgen", clockgen_init);
1608 CLK_OF_DECLARE(qoriq_clockgen_t2080, "fsl,t2080-clockgen", clockgen_init);
1609 CLK_OF_DECLARE(qoriq_clockgen_t4240, "fsl,t4240-clockgen", clockgen_init);