Lines Matching full:regmap
11 #include <linux/regmap.h>
30 struct regmap *regmap; member
38 struct regmap *regmap; member
48 struct regmap *regmap; member
55 struct regmap *regmap; member
62 static inline bool clk_main_osc_ready(struct regmap *regmap) in clk_main_osc_ready() argument
66 regmap_read(regmap, AT91_PMC_SR, &status); in clk_main_osc_ready()
74 struct regmap *regmap = osc->regmap; in clk_main_osc_prepare() local
77 regmap_read(regmap, AT91_CKGR_MOR, &tmp); in clk_main_osc_prepare()
85 regmap_write(regmap, AT91_CKGR_MOR, tmp); in clk_main_osc_prepare()
88 while (!clk_main_osc_ready(regmap)) in clk_main_osc_prepare()
97 struct regmap *regmap = osc->regmap; in clk_main_osc_unprepare() local
100 regmap_read(regmap, AT91_CKGR_MOR, &tmp); in clk_main_osc_unprepare()
108 regmap_write(regmap, AT91_CKGR_MOR, tmp | AT91_PMC_KEY); in clk_main_osc_unprepare()
114 struct regmap *regmap = osc->regmap; in clk_main_osc_is_prepared() local
117 regmap_read(regmap, AT91_CKGR_MOR, &tmp); in clk_main_osc_is_prepared()
121 regmap_read(regmap, AT91_PMC_SR, &status); in clk_main_osc_is_prepared()
152 at91_clk_register_main_osc(struct regmap *regmap, in at91_clk_register_main_osc() argument
176 osc->regmap = regmap; in at91_clk_register_main_osc()
179 regmap_update_bits(regmap, in at91_clk_register_main_osc()
194 static bool clk_main_rc_osc_ready(struct regmap *regmap) in clk_main_rc_osc_ready() argument
198 regmap_read(regmap, AT91_PMC_SR, &status); in clk_main_rc_osc_ready()
206 struct regmap *regmap = osc->regmap; in clk_main_rc_osc_prepare() local
209 regmap_read(regmap, AT91_CKGR_MOR, &mor); in clk_main_rc_osc_prepare()
212 regmap_update_bits(regmap, AT91_CKGR_MOR, in clk_main_rc_osc_prepare()
216 while (!clk_main_rc_osc_ready(regmap)) in clk_main_rc_osc_prepare()
225 struct regmap *regmap = osc->regmap; in clk_main_rc_osc_unprepare() local
228 regmap_read(regmap, AT91_CKGR_MOR, &mor); in clk_main_rc_osc_unprepare()
233 regmap_update_bits(regmap, AT91_CKGR_MOR, in clk_main_rc_osc_unprepare()
240 struct regmap *regmap = osc->regmap; in clk_main_rc_osc_is_prepared() local
243 regmap_read(regmap, AT91_CKGR_MOR, &mor); in clk_main_rc_osc_is_prepared()
244 regmap_read(regmap, AT91_PMC_SR, &status); in clk_main_rc_osc_is_prepared()
293 at91_clk_register_main_rc_osc(struct regmap *regmap, in at91_clk_register_main_rc_osc() argument
316 osc->regmap = regmap; in at91_clk_register_main_rc_osc()
330 static int clk_main_probe_frequency(struct regmap *regmap) in clk_main_probe_frequency() argument
338 regmap_read(regmap, AT91_CKGR_MCFR, &mcfr); in clk_main_probe_frequency()
350 static unsigned long clk_main_recalc_rate(struct regmap *regmap, in clk_main_recalc_rate() argument
359 regmap_read(regmap, AT91_CKGR_MCFR, &mcfr); in clk_main_recalc_rate()
370 return clk_main_probe_frequency(clkmain->regmap); in clk_rm9200_main_prepare()
378 regmap_read(clkmain->regmap, AT91_CKGR_MCFR, &status); in clk_rm9200_main_is_prepared()
388 return clk_main_recalc_rate(clkmain->regmap, parent_rate); in clk_rm9200_main_recalc_rate()
398 at91_clk_register_rm9200_main(struct regmap *regmap, in at91_clk_register_rm9200_main() argument
424 clkmain->regmap = regmap; in at91_clk_register_rm9200_main()
436 static inline bool clk_sam9x5_main_ready(struct regmap *regmap) in clk_sam9x5_main_ready() argument
440 regmap_read(regmap, AT91_PMC_SR, &status); in clk_sam9x5_main_ready()
448 struct regmap *regmap = clkmain->regmap; in clk_sam9x5_main_prepare() local
450 while (!clk_sam9x5_main_ready(regmap)) in clk_sam9x5_main_prepare()
453 return clk_main_probe_frequency(regmap); in clk_sam9x5_main_prepare()
460 return clk_sam9x5_main_ready(clkmain->regmap); in clk_sam9x5_main_is_prepared()
468 return clk_main_recalc_rate(clkmain->regmap, parent_rate); in clk_sam9x5_main_recalc_rate()
474 struct regmap *regmap = clkmain->regmap; in clk_sam9x5_main_set_parent() local
480 regmap_read(regmap, AT91_CKGR_MOR, &tmp); in clk_sam9x5_main_set_parent()
489 regmap_update_bits(regmap, AT91_CKGR_MOR, in clk_sam9x5_main_set_parent()
493 while (!clk_sam9x5_main_ready(regmap)) in clk_sam9x5_main_set_parent()
504 regmap_read(clkmain->regmap, AT91_CKGR_MOR, &status); in clk_sam9x5_main_get_parent()
543 at91_clk_register_sam9x5_main(struct regmap *regmap, in at91_clk_register_sam9x5_main() argument
571 clkmain->regmap = regmap; in at91_clk_register_sam9x5_main()
572 regmap_read(clkmain->regmap, AT91_CKGR_MOR, &status); in at91_clk_register_sam9x5_main()