Lines Matching +full:baikal +full:- +full:t1
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
9 * Baikal-T1 CCU PLL clocks driver
12 #define pr_fmt(fmt) "bt1-ccu-pll: " fmt
17 #include <linux/clk-provider.h>
24 #include <dt-bindings/clock/bt1-ccu.h>
26 #include "ccu-pll.h"
56 * shouldn't be ever gated. SATA and PCIe PLLs are the parents of APB-bus and
57 * DDR controller AXI-bus clocks. If they are gated the system will be
59 * of the corresponding subsystems. So until we aren't ready to re-initialize
88 pll = data->plls[idx]; in ccu_pll_find_desc()
89 if (pll && pll->id == clk_id) in ccu_pll_find_desc()
93 return ERR_PTR(-EINVAL); in ccu_pll_find_desc()
102 return ERR_PTR(-ENOMEM); in ccu_pll_create_data()
104 data->np = np; in ccu_pll_create_data()
116 data->sys_regs = syscon_node_to_regmap(data->np->parent); in ccu_pll_find_sys_regs()
117 if (IS_ERR(data->sys_regs)) { in ccu_pll_find_sys_regs()
119 of_node_full_name(data->np)); in ccu_pll_find_sys_regs()
120 return PTR_ERR(data->sys_regs); in ccu_pll_find_sys_regs()
133 clk_id = clkspec->args[0]; in ccu_pll_of_clk_hw_get()
151 init.id = info->id; in ccu_pll_clk_register()
152 init.name = info->name; in ccu_pll_clk_register()
153 init.parent_name = info->parent_name; in ccu_pll_clk_register()
154 init.base = info->base; in ccu_pll_clk_register()
155 init.sys_regs = data->sys_regs; in ccu_pll_clk_register()
156 init.np = data->np; in ccu_pll_clk_register()
157 init.flags = info->flags; in ccu_pll_clk_register()
159 data->plls[idx] = ccu_pll_hw_register(&init); in ccu_pll_clk_register()
160 if (IS_ERR(data->plls[idx])) { in ccu_pll_clk_register()
161 ret = PTR_ERR(data->plls[idx]); in ccu_pll_clk_register()
168 ret = of_clk_add_hw_provider(data->np, ccu_pll_of_clk_hw_get, data); in ccu_pll_clk_register()
171 of_node_full_name(data->np)); in ccu_pll_clk_register()
178 for (--idx; idx >= 0; --idx) in ccu_pll_clk_register()
179 ccu_pll_hw_unregister(data->plls[idx]); in ccu_pll_clk_register()
206 CLK_OF_DECLARE(ccu_pll, "baikal,bt1-ccu-pll", ccu_pll_init);