Lines Matching +full:bcm6328 +full:- +full:hsspi
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>
147 .name = "hsspi",
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",
235 .name = "hsspi",
332 .name = "hsspi",
459 .name = "hsspi",
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",