Lines Matching +full:fixed +full:- +full:up
1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include <linux/clk-provider.h>
20 struct clk_fixed_rate *fixed; 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()
29 fixed = kzalloc(sizeof(struct clk_fixed_rate), GFP_KERNEL); in sun4i_osc_clk_setup()
30 if (!fixed) in sun4i_osc_clk_setup()
36 of_property_read_string(node, "clock-output-names", &clk_name); in sun4i_osc_clk_setup()
38 /* set up gate and fixed rate properties */ 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()
47 &fixed->hw, &clk_fixed_rate_ops, in sun4i_osc_clk_setup()
48 &gate->hw, &clk_gate_ops, 0); in sun4i_osc_clk_setup()
60 kfree(fixed); in sun4i_osc_clk_setup()
62 CLK_OF_DECLARE(sun4i_osc, "allwinner,sun4i-a10-osc-clk", sun4i_osc_clk_setup);