Lines Matching +full:reg +full:- +full:mux
1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include <linux/clk-provider.h>
24 struct clk_mux *mux; in sun4i_mod1_clk_setup() local
27 const char *clk_name = node->name; in sun4i_mod1_clk_setup()
28 void __iomem *reg; in sun4i_mod1_clk_setup() local
31 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); in sun4i_mod1_clk_setup()
32 if (IS_ERR(reg)) in sun4i_mod1_clk_setup()
35 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in sun4i_mod1_clk_setup()
36 if (!mux) in sun4i_mod1_clk_setup()
43 of_property_read_string(node, "clock-output-names", &clk_name); in sun4i_mod1_clk_setup()
46 gate->reg = reg; in sun4i_mod1_clk_setup()
47 gate->bit_idx = SUN4I_MOD1_ENABLE; in sun4i_mod1_clk_setup()
48 gate->lock = &mod1_lock; in sun4i_mod1_clk_setup()
49 mux->reg = reg; in sun4i_mod1_clk_setup()
50 mux->shift = SUN4I_MOD1_MUX; in sun4i_mod1_clk_setup()
51 mux->mask = BIT(SUN4I_MOD1_MUX_WIDTH) - 1; in sun4i_mod1_clk_setup()
52 mux->lock = &mod1_lock; in sun4i_mod1_clk_setup()
55 &mux->hw, &clk_mux_ops, in sun4i_mod1_clk_setup()
57 &gate->hw, &clk_gate_ops, CLK_SET_RATE_PARENT); in sun4i_mod1_clk_setup()
68 kfree(mux); in sun4i_mod1_clk_setup()
70 iounmap(reg); in sun4i_mod1_clk_setup()
72 CLK_OF_DECLARE(sun4i_mod1, "allwinner,sun4i-a10-mod1-clk",