Lines Matching +full:sun8i +full:- +full:h3 +full:- +full:bus +full:- +full:gates +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Based on clk-simple-gates.c, which is:
8 * Maxime Ripard <maxime.ripard@free-electrons.com>
11 #include <linux/clk-provider.h>
41 int idx = of_property_match_string(node, "clock-names", in sun8i_h3_bus_gates_init()
53 number = of_property_count_u32_elems(node, "clock-indices"); in sun8i_h3_bus_gates_init()
54 of_property_read_u32_index(node, "clock-indices", number - 1, &number); in sun8i_h3_bus_gates_init()
56 clk_data->clks = kcalloc(number + 1, sizeof(struct clk *), GFP_KERNEL); in sun8i_h3_bus_gates_init()
57 if (!clk_data->clks) in sun8i_h3_bus_gates_init()
61 of_property_for_each_u32(node, "clock-indices", prop, p, index) { in sun8i_h3_bus_gates_init()
62 of_property_read_string_index(node, "clock-output-names", in sun8i_h3_bus_gates_init()
81 clk_data->clks[index] = clk_register_gate(NULL, clk_name, in sun8i_h3_bus_gates_init()
87 if (IS_ERR(clk_data->clks[index])) { in sun8i_h3_bus_gates_init()
93 clk_data->clk_num = number + 1; in sun8i_h3_bus_gates_init()
106 CLK_OF_DECLARE(sun8i_h3_bus_gates, "allwinner,sun8i-h3-bus-gates-clk",
108 CLK_OF_DECLARE(sun8i_a83t_bus_gates, "allwinner,sun8i-a83t-bus-gates-clk",