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_round_rate() local
52 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_round_rate()
53 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_round_rate()
63 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_rate() local
64 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_set_rate()
65 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_set_rate()
74 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_is_enabled() local
75 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_is_enabled()
76 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_is_enabled()
85 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_enable() local
86 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_enable()
87 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_enable()
96 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_disable() local
97 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_disable()
98 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_disable()
105 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_disable_unused() local
106 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_disable_unused()
107 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_disable_unused()
114 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_restore_context() local
115 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_restore_context()
116 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_restore_context()
123 if (!(periph->gate.flags & TEGRA_PERIPH_NO_DIV)) in clk_periph_restore_context()
163 struct tegra_clk_periph *periph, in _tegra_clk_register_periph() argument
170 bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV); in _tegra_clk_register_periph()
172 if (periph->gate.flags & TEGRA_PERIPH_NO_DIV) { in _tegra_clk_register_periph()
175 } else if (periph->gate.flags & TEGRA_PERIPH_NO_GATE) in _tegra_clk_register_periph()
185 bank = get_reg_bank(periph->gate.clk_num); in _tegra_clk_register_periph()
190 periph->hw.init = &init; in _tegra_clk_register_periph()
191 periph->magic = TEGRA_CLK_PERIPH_MAGIC; in _tegra_clk_register_periph()
192 periph->mux.reg = clk_base + offset; in _tegra_clk_register_periph()
193 periph->divider.reg = div ? (clk_base + offset) : NULL; in _tegra_clk_register_periph()
194 periph->gate.clk_base = clk_base; in _tegra_clk_register_periph()
195 periph->gate.regs = bank; in _tegra_clk_register_periph()
196 periph->gate.enable_refcnt = periph_clk_enb_refcnt; in _tegra_clk_register_periph()
198 clk = clk_register(NULL, &periph->hw); in _tegra_clk_register_periph()
202 periph->mux.hw.clk = clk; in _tegra_clk_register_periph()
203 periph->divider.hw.clk = div ? clk : NULL; in _tegra_clk_register_periph()
204 periph->gate.hw.clk = clk; in _tegra_clk_register_periph()
211 struct tegra_clk_periph *periph, void __iomem *clk_base, in tegra_clk_register_periph() argument
215 periph, clk_base, offset, flags); in tegra_clk_register_periph()
220 struct tegra_clk_periph *periph, void __iomem *clk_base, in tegra_clk_register_periph_nodiv() argument
223 periph->gate.flags |= TEGRA_PERIPH_NO_DIV; in tegra_clk_register_periph_nodiv()
225 periph, clk_base, offset, CLK_SET_RATE_PARENT); in tegra_clk_register_periph_nodiv()
232 init->num_parents, &init->periph, in tegra_clk_register_periph_data()