Lines Matching refs:hw

24 static u8 clk_periph_get_parent(struct clk_hw *hw)  in clk_periph_get_parent()  argument
26 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_get_parent()
28 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_get_parent()
30 __clk_hw_set_clk(mux_hw, hw); in clk_periph_get_parent()
35 static int clk_periph_set_parent(struct clk_hw *hw, u8 index) in clk_periph_set_parent() argument
37 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_parent()
39 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_set_parent()
41 __clk_hw_set_clk(mux_hw, hw); in clk_periph_set_parent()
46 static unsigned long clk_periph_recalc_rate(struct clk_hw *hw, in clk_periph_recalc_rate() argument
49 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_recalc_rate()
51 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_recalc_rate()
53 __clk_hw_set_clk(div_hw, hw); in clk_periph_recalc_rate()
58 static long clk_periph_round_rate(struct clk_hw *hw, unsigned long rate, in clk_periph_round_rate() argument
61 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_round_rate()
63 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_round_rate()
65 __clk_hw_set_clk(div_hw, hw); in clk_periph_round_rate()
70 static int clk_periph_set_rate(struct clk_hw *hw, unsigned long rate, in clk_periph_set_rate() argument
73 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_rate()
75 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_set_rate()
77 __clk_hw_set_clk(div_hw, hw); in clk_periph_set_rate()
82 static int clk_periph_is_enabled(struct clk_hw *hw) in clk_periph_is_enabled() argument
84 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_is_enabled()
86 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_is_enabled()
88 __clk_hw_set_clk(gate_hw, hw); in clk_periph_is_enabled()
93 static int clk_periph_enable(struct clk_hw *hw) in clk_periph_enable() argument
95 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_enable()
97 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_enable()
99 __clk_hw_set_clk(gate_hw, hw); in clk_periph_enable()
104 static void clk_periph_disable(struct clk_hw *hw) in clk_periph_disable() argument
106 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_disable()
108 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_disable()
169 periph->hw.init = &init; in _tegra_clk_register_periph()
177 clk = clk_register(NULL, &periph->hw); in _tegra_clk_register_periph()
181 periph->mux.hw.clk = clk; in _tegra_clk_register_periph()
182 periph->divider.hw.clk = div ? clk : NULL; in _tegra_clk_register_periph()
183 periph->gate.hw.clk = clk; in _tegra_clk_register_periph()