Lines Matching +full:static +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0
11 static inline struct meson_vclk_gate_data *
14 return (struct meson_vclk_gate_data *)clk->data; in clk_get_meson_vclk_gate_data()
17 static int meson_vclk_gate_enable(struct clk_hw *hw) in meson_vclk_gate_enable()
22 meson_parm_write(clk->map, &vclk->enable, 1); in meson_vclk_gate_enable()
25 meson_parm_write(clk->map, &vclk->reset, 1); in meson_vclk_gate_enable()
26 meson_parm_write(clk->map, &vclk->reset, 0); in meson_vclk_gate_enable()
31 static void meson_vclk_gate_disable(struct clk_hw *hw) in meson_vclk_gate_disable()
36 meson_parm_write(clk->map, &vclk->enable, 0); in meson_vclk_gate_disable()
39 static int meson_vclk_gate_is_enabled(struct clk_hw *hw) in meson_vclk_gate_is_enabled()
44 return meson_parm_read(clk->map, &vclk->enable); in meson_vclk_gate_is_enabled()
48 .enable = meson_vclk_gate_enable,
54 /* The VCLK Divider has supplementary reset & enable bits */
56 static inline struct meson_vclk_div_data *
59 return (struct meson_vclk_div_data *)clk->data; in clk_get_meson_vclk_div_data()
62 static unsigned long meson_vclk_div_recalc_rate(struct clk_hw *hw, in meson_vclk_div_recalc_rate()
68 return divider_recalc_rate(hw, prate, meson_parm_read(clk->map, &vclk->div), in meson_vclk_div_recalc_rate()
69 vclk->table, vclk->flags, vclk->div.width); in meson_vclk_div_recalc_rate()
72 static int meson_vclk_div_determine_rate(struct clk_hw *hw, in meson_vclk_div_determine_rate()
78 return divider_determine_rate(hw, req, vclk->table, vclk->div.width, in meson_vclk_div_determine_rate()
79 vclk->flags); in meson_vclk_div_determine_rate()
82 static int meson_vclk_div_set_rate(struct clk_hw *hw, unsigned long rate, in meson_vclk_div_set_rate()
89 ret = divider_get_val(rate, parent_rate, vclk->table, vclk->div.width, in meson_vclk_div_set_rate()
90 vclk->flags); in meson_vclk_div_set_rate()
94 meson_parm_write(clk->map, &vclk->div, ret); in meson_vclk_div_set_rate()
99 static int meson_vclk_div_enable(struct clk_hw *hw) in meson_vclk_div_enable()
105 meson_parm_write(clk->map, &vclk->reset, 0); in meson_vclk_div_enable()
106 meson_parm_write(clk->map, &vclk->enable, 1); in meson_vclk_div_enable()
111 static void meson_vclk_div_disable(struct clk_hw *hw) in meson_vclk_div_disable()
117 meson_parm_write(clk->map, &vclk->enable, 0); in meson_vclk_div_disable()
118 meson_parm_write(clk->map, &vclk->reset, 1); in meson_vclk_div_disable()
121 static int meson_vclk_div_is_enabled(struct clk_hw *hw) in meson_vclk_div_is_enabled()
126 return meson_parm_read(clk->map, &vclk->enable); in meson_vclk_div_is_enabled()
133 .enable = meson_vclk_div_enable,