Lines Matching refs:clk

352 static size_t clk_stm32_mux_get_parent(struct clk *clk)  in clk_stm32_mux_get_parent()  argument
354 struct clk_stm32_mux_cfg *cfg = clk->priv; in clk_stm32_mux_get_parent()
359 static TEE_Result clk_stm32_mux_set_parent(struct clk *clk, size_t pidx) in clk_stm32_mux_set_parent() argument
361 struct clk_stm32_mux_cfg *cfg = clk->priv; in clk_stm32_mux_set_parent()
372 static TEE_Result clk_stm32_gate_enable(struct clk *clk) in clk_stm32_gate_enable() argument
374 struct clk_stm32_gate_cfg *cfg = clk->priv; in clk_stm32_gate_enable()
381 static void clk_stm32_gate_disable(struct clk *clk) in clk_stm32_gate_disable() argument
383 struct clk_stm32_gate_cfg *cfg = clk->priv; in clk_stm32_gate_disable()
393 static TEE_Result clk_stm32_gate_ready_enable(struct clk *clk) in clk_stm32_gate_ready_enable() argument
395 struct clk_stm32_gate_cfg *cfg = clk->priv; in clk_stm32_gate_ready_enable()
400 static void clk_stm32_gate_ready_disable(struct clk *clk) in clk_stm32_gate_ready_disable() argument
402 struct clk_stm32_gate_cfg *cfg = clk->priv; in clk_stm32_gate_ready_disable()
414 unsigned long clk_stm32_divider_get_rate(struct clk *clk, in clk_stm32_divider_get_rate() argument
417 struct clk_stm32_div_cfg *cfg = clk->priv; in clk_stm32_divider_get_rate()
422 TEE_Result clk_stm32_divider_set_rate(struct clk *clk, in clk_stm32_divider_set_rate() argument
426 struct clk_stm32_div_cfg *cfg = clk->priv; in clk_stm32_divider_set_rate()
437 size_t clk_stm32_composite_get_parent(struct clk *clk) in clk_stm32_composite_get_parent() argument
439 struct clk_stm32_composite_cfg *cfg = clk->priv; in clk_stm32_composite_get_parent()
449 TEE_Result clk_stm32_composite_set_parent(struct clk *clk, size_t pidx) in clk_stm32_composite_set_parent() argument
451 struct clk_stm32_composite_cfg *cfg = clk->priv; in clk_stm32_composite_set_parent()
459 unsigned long clk_stm32_composite_get_rate(struct clk *clk, in clk_stm32_composite_get_rate() argument
462 struct clk_stm32_composite_cfg *cfg = clk->priv; in clk_stm32_composite_get_rate()
470 TEE_Result clk_stm32_composite_set_rate(struct clk *clk, unsigned long rate, in clk_stm32_composite_set_rate() argument
473 struct clk_stm32_composite_cfg *cfg = clk->priv; in clk_stm32_composite_set_rate()
481 TEE_Result clk_stm32_composite_gate_enable(struct clk *clk) in clk_stm32_composite_gate_enable() argument
483 struct clk_stm32_composite_cfg *cfg = clk->priv; in clk_stm32_composite_gate_enable()
490 void clk_stm32_composite_gate_disable(struct clk *clk) in clk_stm32_composite_gate_disable() argument
492 struct clk_stm32_composite_cfg *cfg = clk->priv; in clk_stm32_composite_gate_disable()
506 TEE_Result clk_stm32_set_parent_by_index(struct clk *clk, size_t pidx) in clk_stm32_set_parent_by_index() argument
508 struct clk *parent = clk_get_parent_by_index(clk, pidx); in clk_stm32_set_parent_by_index()
512 res = clk_set_parent(clk, parent); in clk_stm32_set_parent_by_index()
550 static unsigned long fixed_factor_get_rate(struct clk *clk, in fixed_factor_get_rate() argument
553 struct fixed_factor_cfg *d = clk->priv; in fixed_factor_get_rate()
567 static unsigned long clk_fixed_get_rate(struct clk *clk, in clk_fixed_get_rate() argument
570 struct clk_fixed_rate_cfg *cfg = clk->priv; in clk_fixed_get_rate()
579 struct clk *stm32mp_rcc_clock_id_to_clk(unsigned long clock_id) in stm32mp_rcc_clock_id_to_clk()
591 struct clk **out_clk) in stm32mp_clk_dt_get_clk()
594 struct clk *clk = NULL; in stm32mp_clk_dt_get_clk() local
599 clk = stm32mp_rcc_clock_id_to_clk(clock_id); in stm32mp_clk_dt_get_clk()
600 if (!clk) in stm32mp_clk_dt_get_clk()
603 *out_clk = clk; in stm32mp_clk_dt_get_clk()
613 struct clk *clk = priv->clk_refs[i]; in clk_stm32_register_clocks() local
615 if (!clk) in clk_stm32_register_clocks()
618 refcount_set(&clk->enabled_count, 0); in clk_stm32_register_clocks()
620 if (clk_register(clk)) in clk_stm32_register_clocks()
626 struct clk *clk = priv->clk_refs[i]; in clk_stm32_register_clocks() local
628 if (!clk) in clk_stm32_register_clocks()
631 if (priv->is_critical && priv->is_critical(clk)) in clk_stm32_register_clocks()
632 clk_enable(clk); in clk_stm32_register_clocks()