Lines Matching +full:clock +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/clk-provider.h>
8 #include <dt-bindings/clock/bcm3368-clock.h>
9 #include <dt-bindings/clock/bcm6318-clock.h>
10 #include <dt-bindings/clock/bcm6328-clock.h>
11 #include <dt-bindings/clock/bcm6358-clock.h>
12 #include <dt-bindings/clock/bcm6362-clock.h>
13 #include <dt-bindings/clock/bcm6368-clock.h>
14 #include <dt-bindings/clock/bcm63268-clock.h>
17 const char * const name; member
31 .name = "mac",
34 .name = "tc",
37 .name = "us_top",
40 .name = "ds_top",
43 .name = "acm",
46 .name = "spi",
49 .name = "usbs",
52 .name = "bmu",
55 .name = "pcm",
58 .name = "ntp",
61 .name = "acp_b",
64 .name = "acp_a",
67 .name = "emusb",
70 .name = "enet0",
73 .name = "enet1",
76 .name = "usbsu",
79 .name = "ephy",
88 .name = "adsl_asb",
91 .name = "usb_asb",
94 .name = "mips_asb",
97 .name = "pcie_asb",
100 .name = "phymips_asb",
103 .name = "robosw_asb",
106 .name = "sar_asb",
109 .name = "sdr_asb",
112 .name = "swreg_asb",
115 .name = "periph_asb",
118 .name = "cpubus160",
121 .name = "adsl",
124 .name = "sar125",
127 .name = "mips",
131 .name = "pcie",
134 .name = "robosw250",
137 .name = "robosw025",
140 .name = "sdr",
144 .name = "usbd",
147 .name = "hsspi",
150 .name = "pcie25",
153 .name = "phymips",
156 .name = "afe",
159 .name = "qproc",
168 .name = "adsl-ubus",
171 .name = "arb-ubus",
175 .name = "mips-ubus",
179 .name = "pcie-ubus",
182 .name = "periph-ubus",
186 .name = "phymips-ubus",
189 .name = "robosw-ubus",
192 .name = "sar-ubus",
195 .name = "sdr-ubus",
198 .name = "usb-ubus",
207 .name = "phy_mips",
210 .name = "adsl_qproc",
213 .name = "adsl_afe",
216 .name = "adsl",
219 .name = "mips",
223 .name = "sar",
226 .name = "pcm",
229 .name = "usbd",
232 .name = "usbh",
235 .name = "hsspi",
238 .name = "pcie",
241 .name = "robosw",
250 .name = "enet",
253 .name = "adslphy",
256 .name = "pcm",
259 .name = "spi",
262 .name = "usbs",
265 .name = "sar",
268 .name = "emusb",
271 .name = "enet0",
274 .name = "enet1",
277 .name = "usbsu",
280 .name = "ephy",
289 .name = "adsl_qproc",
292 .name = "adsl_afe",
295 .name = "adsl",
298 .name = "mips",
302 .name = "wlan_ocp",
305 .name = "swpkt_usb",
308 .name = "swpkt_sar",
311 .name = "sar",
314 .name = "robosw",
317 .name = "pcm",
320 .name = "usbd",
323 .name = "usbh",
326 .name = "ipsec",
329 .name = "spi",
332 .name = "hsspi",
335 .name = "pcie",
338 .name = "fap",
341 .name = "phymips",
344 .name = "nand",
353 .name = "vdsl_qproc",
356 .name = "vdsl_afe",
359 .name = "vdsl_bonding",
362 .name = "vdsl",
365 .name = "phymips",
368 .name = "swpkt_usb",
371 .name = "swpkt_sar",
374 .name = "spi",
377 .name = "usbd",
380 .name = "sar",
383 .name = "robosw",
386 .name = "utopia",
389 .name = "pcm",
392 .name = "usbh",
395 .name = "disable_gless",
398 .name = "nand",
401 .name = "ipsec",
410 .name = "disable_gless",
413 .name = "vdsl_qproc",
416 .name = "vdsl_afe",
419 .name = "vdsl",
422 .name = "mips",
426 .name = "wlan_ocp",
429 .name = "dect",
432 .name = "fap0",
435 .name = "fap1",
438 .name = "sar",
441 .name = "robosw",
444 .name = "pcm",
447 .name = "usbd",
450 .name = "usbh",
453 .name = "ipsec",
456 .name = "spi",
459 .name = "hsspi",
462 .name = "pcie",
465 .name = "phymips",
468 .name = "gmac",
471 .name = "nand",
474 .name = "tbus",
477 .name = "robosw250",
491 table = of_device_get_match_data(&pdev->dev); in clk_bcm63xx_probe()
493 return -EINVAL; in clk_bcm63xx_probe()
495 for (entry = table; entry->name; entry++) in clk_bcm63xx_probe()
496 maxbit = max_t(u8, maxbit, entry->bit); in clk_bcm63xx_probe()
499 hw = devm_kzalloc(&pdev->dev, struct_size(hw, data.hws, maxbit), in clk_bcm63xx_probe()
502 return -ENOMEM; in clk_bcm63xx_probe()
506 spin_lock_init(&hw->lock); in clk_bcm63xx_probe()
508 hw->data.num = maxbit; in clk_bcm63xx_probe()
510 hw->data.hws[i] = ERR_PTR(-ENODEV); in clk_bcm63xx_probe()
512 hw->regs = devm_platform_ioremap_resource(pdev, 0); in clk_bcm63xx_probe()
513 if (IS_ERR(hw->regs)) in clk_bcm63xx_probe()
514 return PTR_ERR(hw->regs); in clk_bcm63xx_probe()
516 for (entry = table; entry->name; entry++) { in clk_bcm63xx_probe()
519 clk = clk_hw_register_gate(&pdev->dev, entry->name, NULL, in clk_bcm63xx_probe()
520 entry->flags, hw->regs, entry->bit, in clk_bcm63xx_probe()
521 CLK_GATE_BIG_ENDIAN, &hw->lock); in clk_bcm63xx_probe()
527 hw->data.hws[entry->bit] = clk; in clk_bcm63xx_probe()
530 ret = of_clk_add_hw_provider(pdev->dev.of_node, of_clk_hw_onecell_get, in clk_bcm63xx_probe()
531 &hw->data); in clk_bcm63xx_probe()
535 for (i = 0; i < hw->data.num; i++) { in clk_bcm63xx_probe()
536 if (!IS_ERR(hw->data.hws[i])) in clk_bcm63xx_probe()
537 clk_hw_unregister_gate(hw->data.hws[i]); in clk_bcm63xx_probe()
548 of_clk_del_provider(pdev->dev.of_node); in clk_bcm63xx_remove()
550 for (i = 0; i < hw->data.num; i++) { in clk_bcm63xx_remove()
551 if (!IS_ERR(hw->data.hws[i])) in clk_bcm63xx_remove()
552 clk_hw_unregister_gate(hw->data.hws[i]); in clk_bcm63xx_remove()
557 { .compatible = "brcm,bcm3368-clocks", .data = &bcm3368_clocks, },
558 { .compatible = "brcm,bcm6318-clocks", .data = &bcm6318_clocks, },
559 { .compatible = "brcm,bcm6318-ubus-clocks", .data = &bcm6318_ubus_clocks, },
560 { .compatible = "brcm,bcm6328-clocks", .data = &bcm6328_clocks, },
561 { .compatible = "brcm,bcm6358-clocks", .data = &bcm6358_clocks, },
562 { .compatible = "brcm,bcm6362-clocks", .data = &bcm6362_clocks, },
563 { .compatible = "brcm,bcm6368-clocks", .data = &bcm6368_clocks, },
564 { .compatible = "brcm,bcm63268-clocks", .data = &bcm63268_clocks, },
572 .name = "bcm63xx-clock",