Lines Matching refs:prog
35 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_recalc_rate() local
36 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_recalc_rate()
40 regmap_read(prog->regmap, AT91_PMC_PCKR(prog->id), &pckr); in clk_programmable_recalc_rate()
53 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_determine_rate() local
54 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_determine_rate()
105 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_set_parent() local
106 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_set_parent()
113 if (prog->mux_table) in clk_programmable_set_parent()
114 pckr = clk_mux_index_to_val(prog->mux_table, 0, index); in clk_programmable_set_parent()
123 regmap_update_bits(prog->regmap, AT91_PMC_PCKR(prog->id), mask, pckr); in clk_programmable_set_parent()
130 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_get_parent() local
131 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_get_parent()
135 regmap_read(prog->regmap, AT91_PMC_PCKR(prog->id), &pckr); in clk_programmable_get_parent()
142 if (prog->mux_table) in clk_programmable_get_parent()
143 ret = clk_mux_val_to_index(&prog->hw, prog->mux_table, 0, ret); in clk_programmable_get_parent()
151 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_set_rate() local
152 const struct clk_programmable_layout *layout = prog->layout; in clk_programmable_set_rate()
174 regmap_update_bits(prog->regmap, AT91_PMC_PCKR(prog->id), in clk_programmable_set_rate()
183 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_save_context() local
186 prog->pms.parent = clk_programmable_get_parent(hw); in clk_programmable_save_context()
187 prog->pms.parent_rate = clk_hw_get_rate(parent_hw); in clk_programmable_save_context()
188 prog->pms.rate = clk_programmable_recalc_rate(hw, prog->pms.parent_rate); in clk_programmable_save_context()
195 struct clk_programmable *prog = to_clk_programmable(hw); in clk_programmable_restore_context() local
198 ret = clk_programmable_set_parent(hw, prog->pms.parent); in clk_programmable_restore_context()
202 clk_programmable_set_rate(hw, prog->pms.rate, prog->pms.parent_rate); in clk_programmable_restore_context()
222 struct clk_programmable *prog; in at91_clk_register_programmable() local
230 prog = kzalloc(sizeof(*prog), GFP_KERNEL); in at91_clk_register_programmable()
231 if (!prog) in at91_clk_register_programmable()
240 prog->id = id; in at91_clk_register_programmable()
241 prog->layout = layout; in at91_clk_register_programmable()
242 prog->hw.init = &init; in at91_clk_register_programmable()
243 prog->regmap = regmap; in at91_clk_register_programmable()
244 prog->mux_table = mux_table; in at91_clk_register_programmable()
246 hw = &prog->hw; in at91_clk_register_programmable()
247 ret = clk_hw_register(NULL, &prog->hw); in at91_clk_register_programmable()
249 kfree(prog); in at91_clk_register_programmable()