Lines Matching refs:periph
27 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_get_parent() local
28 const struct clk_ops *mux_ops = periph->mux_ops; in clk_periph_get_parent()
29 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_get_parent()
38 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_parent() local
39 const struct clk_ops *mux_ops = periph->mux_ops; in clk_periph_set_parent()
40 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_set_parent()
50 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_recalc_rate() local
51 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_recalc_rate()
52 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_recalc_rate()
62 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_round_rate() local
63 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_round_rate()
64 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_round_rate()
74 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_set_rate() local
75 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_set_rate()
76 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_set_rate()
85 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_is_enabled() local
86 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_is_enabled()
87 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_is_enabled()
96 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_enable() local
97 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_enable()
98 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_enable()
107 struct tegra_clk_periph *periph = to_clk_periph(hw); in clk_periph_disable() local
108 const struct clk_ops *gate_ops = periph->gate_ops; in clk_periph_disable()
109 struct clk_hw *gate_hw = &periph->gate.hw; in clk_periph_disable()
143 struct tegra_clk_periph *periph, in _tegra_clk_register_periph() argument
150 bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV); in _tegra_clk_register_periph()
152 if (periph->gate.flags & TEGRA_PERIPH_NO_DIV) { in _tegra_clk_register_periph()
155 } else if (periph->gate.flags & TEGRA_PERIPH_NO_GATE) in _tegra_clk_register_periph()
165 bank = get_reg_bank(periph->gate.clk_num); in _tegra_clk_register_periph()
170 periph->hw.init = &init; in _tegra_clk_register_periph()
171 periph->magic = TEGRA_CLK_PERIPH_MAGIC; in _tegra_clk_register_periph()
172 periph->mux.reg = clk_base + offset; in _tegra_clk_register_periph()
173 periph->divider.reg = div ? (clk_base + offset) : NULL; in _tegra_clk_register_periph()
174 periph->gate.clk_base = clk_base; in _tegra_clk_register_periph()
175 periph->gate.regs = bank; in _tegra_clk_register_periph()
176 periph->gate.enable_refcnt = periph_clk_enb_refcnt; in _tegra_clk_register_periph()
178 clk = clk_register(NULL, &periph->hw); in _tegra_clk_register_periph()
182 periph->mux.hw.clk = clk; in _tegra_clk_register_periph()
183 periph->divider.hw.clk = div ? clk : NULL; in _tegra_clk_register_periph()
184 periph->gate.hw.clk = clk; in _tegra_clk_register_periph()
191 struct tegra_clk_periph *periph, void __iomem *clk_base, in tegra_clk_register_periph() argument
195 periph, clk_base, offset, flags); in tegra_clk_register_periph()
200 struct tegra_clk_periph *periph, void __iomem *clk_base, in tegra_clk_register_periph_nodiv() argument
203 periph->gate.flags |= TEGRA_PERIPH_NO_DIV; in tegra_clk_register_periph_nodiv()
205 periph, clk_base, offset, CLK_SET_RATE_PARENT); in tegra_clk_register_periph_nodiv()