Lines Matching +full:static +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0-only
7 #include <linux/clk-provider.h>
11 #include <dt-bindings/clock/bcm-sr.h>
12 #include "clk-iproc.h"
34 static const struct iproc_pll_ctrl sr_genpll0 = {
47 static const struct iproc_clk_ctrl sr_genpll0_clk[] = {
51 .enable = ENABLE_VAL(0x4, 6, 0, 12),
57 .enable = ENABLE_VAL(0x4, 7, 1, 13),
63 .enable = ENABLE_VAL(0x4, 8, 2, 14),
69 .enable = ENABLE_VAL(0x4, 9, 3, 15),
75 .enable = ENABLE_VAL(0x4, 10, 4, 16),
81 .enable = ENABLE_VAL(0x4, 11, 5, 17),
86 static int sr_genpll0_clk_init(struct platform_device *pdev) in sr_genpll0_clk_init()
88 iproc_pll_clk_setup(pdev->dev.of_node, in sr_genpll0_clk_init()
94 static const struct iproc_pll_ctrl sr_genpll2 = {
107 static const struct iproc_clk_ctrl sr_genpll2_clk[] = {
111 .enable = ENABLE_VAL(0x4, 6, 0, 12),
117 .enable = ENABLE_VAL(0x4, 7, 1, 13),
123 .enable = ENABLE_VAL(0x4, 8, 2, 14),
129 .enable = ENABLE_VAL(0x4, 9, 3, 15),
135 .enable = ENABLE_VAL(0x4, 10, 4, 16),
140 .enable = ENABLE_VAL(0x4, 11, 5, 17),
145 static int sr_genpll2_clk_init(struct platform_device *pdev) in sr_genpll2_clk_init()
147 iproc_pll_clk_setup(pdev->dev.of_node, in sr_genpll2_clk_init()
153 static const struct iproc_pll_ctrl sr_genpll3 = {
166 static const struct iproc_clk_ctrl sr_genpll3_clk[] = {
170 .enable = ENABLE_VAL(0x4, 6, 0, 12),
176 .enable = ENABLE_VAL(0x4, 7, 1, 13),
181 static void sr_genpll3_clk_init(struct device_node *node) in sr_genpll3_clk_init()
186 CLK_OF_DECLARE(sr_genpll3_clk, "brcm,sr-genpll3", sr_genpll3_clk_init);
188 static const struct iproc_pll_ctrl sr_genpll4 = {
201 static const struct iproc_clk_ctrl sr_genpll4_clk[] = {
205 .enable = ENABLE_VAL(0x4, 6, 0, 12),
211 .enable = ENABLE_VAL(0x4, 7, 1, 13),
217 .enable = ENABLE_VAL(0x4, 8, 2, 14),
223 .enable = ENABLE_VAL(0x4, 9, 3, 15),
229 .enable = ENABLE_VAL(0x4, 10, 4, 16),
234 static int sr_genpll4_clk_init(struct platform_device *pdev) in sr_genpll4_clk_init()
236 iproc_pll_clk_setup(pdev->dev.of_node, in sr_genpll4_clk_init()
242 static const struct iproc_pll_ctrl sr_genpll5 = {
255 static const struct iproc_clk_ctrl sr_genpll5_clk[] = {
258 .enable = ENABLE_VAL(0x4, 6, 0, 12),
263 .enable = ENABLE_VAL(0x4, 7, 1, 12),
268 .enable = ENABLE_VAL(0x4, 8, 2, 14),
273 static int sr_genpll5_clk_init(struct platform_device *pdev) in sr_genpll5_clk_init()
275 iproc_pll_clk_setup(pdev->dev.of_node, in sr_genpll5_clk_init()
281 static const struct iproc_pll_ctrl sr_lcpll0 = {
291 static const struct iproc_clk_ctrl sr_lcpll0_clk[] = {
295 .enable = ENABLE_VAL(0x0, 7, 1, 13),
301 .enable = ENABLE_VAL(0x0, 8, 2, 14),
307 .enable = ENABLE_VAL(0x0, 9, 3, 15),
313 .enable = ENABLE_VAL(0x0, 10, 4, 16),
318 static int sr_lcpll0_clk_init(struct platform_device *pdev) in sr_lcpll0_clk_init()
320 iproc_pll_clk_setup(pdev->dev.of_node, in sr_lcpll0_clk_init()
326 static const struct iproc_pll_ctrl sr_lcpll1 = {
336 static const struct iproc_clk_ctrl sr_lcpll1_clk[] = {
340 .enable = ENABLE_VAL(0x0, 7, 1, 13),
346 .enable = ENABLE_VAL(0x0, 8, 2, 14),
352 .enable = ENABLE_VAL(0x0, 9, 3, 15),
357 static int sr_lcpll1_clk_init(struct platform_device *pdev) in sr_lcpll1_clk_init()
359 iproc_pll_clk_setup(pdev->dev.of_node, in sr_lcpll1_clk_init()
365 static const struct iproc_pll_ctrl sr_lcpll_pcie = {
375 static const struct iproc_clk_ctrl sr_lcpll_pcie_clk[] = {
379 .enable = ENABLE_VAL(0x0, 7, 1, 13),
384 static int sr_lcpll_pcie_clk_init(struct platform_device *pdev) in sr_lcpll_pcie_clk_init()
386 iproc_pll_clk_setup(pdev->dev.of_node, in sr_lcpll_pcie_clk_init()
392 static const struct of_device_id sr_clk_dt_ids[] = {
393 { .compatible = "brcm,sr-genpll0", .data = sr_genpll0_clk_init },
394 { .compatible = "brcm,sr-genpll2", .data = sr_genpll2_clk_init },
395 { .compatible = "brcm,sr-genpll4", .data = sr_genpll4_clk_init },
396 { .compatible = "brcm,sr-genpll5", .data = sr_genpll5_clk_init },
397 { .compatible = "brcm,sr-lcpll0", .data = sr_lcpll0_clk_init },
398 { .compatible = "brcm,sr-lcpll1", .data = sr_lcpll1_clk_init },
399 { .compatible = "brcm,sr-lcpll-pcie", .data = sr_lcpll_pcie_clk_init },
403 static int sr_clk_probe(struct platform_device *pdev) in sr_clk_probe()
407 probe_func = of_device_get_match_data(&pdev->dev); in sr_clk_probe()
409 return -ENODEV; in sr_clk_probe()
414 static struct platform_driver sr_clk_driver = {
416 .name = "sr-clk",