Lines Matching refs:regmap
32 struct regmap *regmap; member
60 static inline bool sam9x60_pll_ready(struct regmap *regmap, int id) in sam9x60_pll_ready() argument
64 regmap_read(regmap, AT91_PMC_PLL_ISR0, &status); in sam9x60_pll_ready()
69 static bool sam9x60_frac_pll_ready(struct regmap *regmap, u8 id) in sam9x60_frac_pll_ready() argument
71 return sam9x60_pll_ready(regmap, id); in sam9x60_frac_pll_ready()
87 struct regmap *regmap = core->regmap; in sam9x60_frac_pll_set() local
93 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_set()
95 regmap_read(regmap, AT91_PMC_PLL_CTRL1, &val); in sam9x60_frac_pll_set()
99 if (sam9x60_frac_pll_ready(regmap, core->id) && in sam9x60_frac_pll_set()
108 regmap_write(regmap, AT91_PMC_PLL_ACR, val); in sam9x60_frac_pll_set()
110 regmap_write(regmap, AT91_PMC_PLL_CTRL1, in sam9x60_frac_pll_set()
117 regmap_write(regmap, AT91_PMC_PLL_ACR, val); in sam9x60_frac_pll_set()
123 regmap_write(regmap, AT91_PMC_PLL_ACR, val); in sam9x60_frac_pll_set()
128 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_set()
132 regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0, in sam9x60_frac_pll_set()
136 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_set()
140 while (!sam9x60_pll_ready(regmap, core->id)) in sam9x60_frac_pll_set()
159 struct regmap *regmap = core->regmap; in sam9x60_frac_pll_unprepare() local
164 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_unprepare()
167 regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0, AT91_PMC_PLL_CTRL0_ENPLL, 0); in sam9x60_frac_pll_unprepare()
170 regmap_update_bits(regmap, AT91_PMC_PLL_ACR, in sam9x60_frac_pll_unprepare()
173 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_unprepare()
184 return sam9x60_pll_ready(core->regmap, core->id); in sam9x60_frac_pll_is_prepared()
249 struct regmap *regmap = core->regmap; in sam9x60_frac_pll_set_rate_chg() local
260 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK, in sam9x60_frac_pll_set_rate_chg()
262 regmap_read(regmap, AT91_PMC_PLL_CTRL1, &val); in sam9x60_frac_pll_set_rate_chg()
269 regmap_write(regmap, AT91_PMC_PLL_CTRL1, in sam9x60_frac_pll_set_rate_chg()
273 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_set_rate_chg()
277 regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0, in sam9x60_frac_pll_set_rate_chg()
282 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_frac_pll_set_rate_chg()
286 while (!sam9x60_pll_ready(regmap, core->id)) in sam9x60_frac_pll_set_rate_chg()
300 frac->pms.status = sam9x60_pll_ready(core->regmap, core->id); in sam9x60_frac_pll_save_context()
340 struct regmap *regmap = core->regmap; in sam9x60_div_pll_set_div() local
344 regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0, in sam9x60_div_pll_set_div()
348 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_div_pll_set_div()
352 while (!sam9x60_pll_ready(regmap, core->id)) in sam9x60_div_pll_set_div()
359 struct regmap *regmap = core->regmap; in sam9x60_div_pll_set() local
364 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_div_pll_set()
366 regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val); in sam9x60_div_pll_set()
391 struct regmap *regmap = core->regmap; in sam9x60_div_pll_unprepare() local
396 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_div_pll_unprepare()
399 regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0, in sam9x60_div_pll_unprepare()
402 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_div_pll_unprepare()
412 struct regmap *regmap = core->regmap; in sam9x60_div_pll_is_prepared() local
418 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_div_pll_is_prepared()
420 regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val); in sam9x60_div_pll_is_prepared()
503 struct regmap *regmap = core->regmap; in sam9x60_div_pll_set_rate_chg() local
510 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK, in sam9x60_div_pll_set_rate_chg()
512 regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val); in sam9x60_div_pll_set_rate_chg()
551 struct regmap *regmap = core.regmap; in sam9x60_div_pll_notifier_fn() local
566 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK, in sam9x60_div_pll_notifier_fn()
568 regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val); in sam9x60_div_pll_notifier_fn()
611 sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, in sam9x60_clk_register_frac_pll() argument
645 frac->core.regmap = regmap; in sam9x60_clk_register_frac_pll()
649 if (sam9x60_pll_ready(regmap, id)) { in sam9x60_clk_register_frac_pll()
650 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_clk_register_frac_pll()
652 regmap_read(regmap, AT91_PMC_PLL_CTRL1, &val); in sam9x60_clk_register_frac_pll()
694 sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock, in sam9x60_clk_register_div_pll() argument
731 div->core.regmap = regmap; in sam9x60_clk_register_div_pll()
737 regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, in sam9x60_clk_register_div_pll()
739 regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val); in sam9x60_clk_register_div_pll()