Lines Matching +full:sun4i +full:- +full:a10 +full:- +full:osc +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include <linux/clk-provider.h>
19 struct clk *clk; in sun4i_osc_clk_setup() local
22 const char *clk_name = node->name; in sun4i_osc_clk_setup()
25 if (of_property_read_u32(node, "clock-frequency", &rate)) in sun4i_osc_clk_setup()
28 /* allocate fixed-rate and gate clock structs */ in sun4i_osc_clk_setup()
36 of_property_read_string(node, "clock-output-names", &clk_name); in sun4i_osc_clk_setup()
39 gate->reg = of_iomap(node, 0); in sun4i_osc_clk_setup()
40 gate->bit_idx = SUNXI_OSC24M_GATE; in sun4i_osc_clk_setup()
41 gate->lock = &hosc_lock; in sun4i_osc_clk_setup()
42 fixed->fixed_rate = rate; in sun4i_osc_clk_setup()
44 clk = clk_register_composite(NULL, clk_name, in sun4i_osc_clk_setup()
47 &fixed->hw, &clk_fixed_rate_ops, in sun4i_osc_clk_setup()
48 &gate->hw, &clk_gate_ops, 0); in sun4i_osc_clk_setup()
50 if (IS_ERR(clk)) in sun4i_osc_clk_setup()
53 of_clk_add_provider(node, of_clk_src_simple_get, clk); in sun4i_osc_clk_setup()
62 CLK_OF_DECLARE(sun4i_osc, "allwinner,sun4i-a10-osc-clk", sun4i_osc_clk_setup);