Lines Matching +full:r8a7740 +full:- +full:cpg +full:- +full:clocks

1 // SPDX-License-Identifier: GPL-2.0
3 * r8a7740 Core CPG Clocks
8 #include <linux/clk-provider.h>
62 r8a7740_cpg_register_clock(struct device_node *np, struct r8a7740_cpg *cpg, in r8a7740_cpg_register_clock() argument
93 /* PLLC0/1 are configurable multiplier clocks. Register them as in r8a7740_cpg_register_clock()
94 * fixed factor clocks for now as there's no generic multiplier in r8a7740_cpg_register_clock()
121 for (c = div4_clks; c->name; c++) { in r8a7740_cpg_register_clock()
122 if (!strcmp(name, c->name)) { in r8a7740_cpg_register_clock()
125 reg = c->reg; in r8a7740_cpg_register_clock()
126 shift = c->shift; in r8a7740_cpg_register_clock()
130 if (!c->name) in r8a7740_cpg_register_clock()
131 return ERR_PTR(-EINVAL); in r8a7740_cpg_register_clock()
140 table, &cpg->lock); in r8a7740_cpg_register_clock()
146 struct r8a7740_cpg *cpg; in r8a7740_cpg_clocks_init() local
155 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7740_cpg_clocks_init()
157 pr_err("%s: failed to count clocks\n", __func__); in r8a7740_cpg_clocks_init()
161 cpg = kzalloc(sizeof(*cpg), GFP_KERNEL); in r8a7740_cpg_clocks_init()
163 if (cpg == NULL || clks == NULL) { in r8a7740_cpg_clocks_init()
170 spin_lock_init(&cpg->lock); in r8a7740_cpg_clocks_init()
172 cpg->data.clks = clks; in r8a7740_cpg_clocks_init()
173 cpg->data.clk_num = num_clks; in r8a7740_cpg_clocks_init()
183 of_property_read_string_index(np, "clock-output-names", i, in r8a7740_cpg_clocks_init()
186 clk = r8a7740_cpg_register_clock(np, cpg, base, name); in r8a7740_cpg_clocks_init()
191 cpg->data.clks[i] = clk; in r8a7740_cpg_clocks_init()
194 of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); in r8a7740_cpg_clocks_init()
196 CLK_OF_DECLARE(r8a7740_cpg_clks, "renesas,r8a7740-cpg-clocks",