Lines Matching refs:periph
16 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_get_parent() local
17 const struct clk_ops *mux_ops = periph->mux_ops; in clk_periph_get_parent()
18 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_get_parent()
27 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_parent() local
28 const struct clk_ops *mux_ops = periph->mux_ops; in clk_periph_set_parent()
29 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_set_parent()
39 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_recalc_rate() local
40 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_recalc_rate()
41 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_recalc_rate()
51 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_determine_rate() local
52 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_determine_rate()
53 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_determine_rate()
69 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_rate() local
70 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_set_rate()
71 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_set_rate()
80 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_is_enabled() local
81 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_is_enabled()
82 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_is_enabled()
91 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_enable() local
92 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_enable()
93 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_enable()
102 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_disable() local
103 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_disable()
104 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_disable()
111 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_disable_unused() local
112 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_disable_unused()
113 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_disable_unused()
120 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_restore_context() local
121 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_restore_context()
122 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_restore_context()
129 if (!(periph->gate.flags & TEGRA_PERIPH_NO_DIV)) in clk_periph_restore_context()
170 struct tegra_clk_periph *periph, in _tegra_clk_register_periph() argument
177 bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV); in _tegra_clk_register_periph()
179 if (periph->gate.flags & TEGRA_PERIPH_NO_DIV) { in _tegra_clk_register_periph()
182 } else if (periph->gate.flags & TEGRA_PERIPH_NO_GATE) in _tegra_clk_register_periph()
192 bank = get_reg_bank(periph->gate.clk_num); in _tegra_clk_register_periph()
197 periph->hw.init = &init; in _tegra_clk_register_periph()
198 periph->magic = TEGRA_CLK_PERIPH_MAGIC; in _tegra_clk_register_periph()
199 periph->mux.reg = clk_base + offset; in _tegra_clk_register_periph()
200 periph->divider.reg = div ? (clk_base + offset) : NULL; in _tegra_clk_register_periph()
201 periph->gate.clk_base = clk_base; in _tegra_clk_register_periph()
202 periph->gate.regs = bank; in _tegra_clk_register_periph()
203 periph->gate.enable_refcnt = periph_clk_enb_refcnt; in _tegra_clk_register_periph()
205 clk = clk_register(NULL, &periph->hw); in _tegra_clk_register_periph()
209 periph->mux.hw.clk = clk; in _tegra_clk_register_periph()
210 periph->divider.hw.clk = div ? clk : NULL; in _tegra_clk_register_periph()
211 periph->gate.hw.clk = clk; in _tegra_clk_register_periph()
218 struct tegra_clk_periph *periph, void __iomem *clk_base, in tegra_clk_register_periph() argument
222 periph, clk_base, offset, flags); in tegra_clk_register_periph()
227 struct tegra_clk_periph *periph, void __iomem *clk_base, in tegra_clk_register_periph_nodiv() argument
230 periph->gate.flags |= TEGRA_PERIPH_NO_DIV; in tegra_clk_register_periph_nodiv()
232 periph, clk_base, offset, CLK_SET_RATE_PARENT); in tegra_clk_register_periph_nodiv()
239 init->num_parents, &init->periph, in tegra_clk_register_periph_data()