Lines Matching refs:bcm_clk
976 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_enable() local
977 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_enable()
979 return clk_gate(bcm_clk->ccu, bcm_clk->init_data.name, gate, true); in kona_peri_clk_enable()
984 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_disable() local
985 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_disable()
987 (void)clk_gate(bcm_clk->ccu, bcm_clk->init_data.name, gate, false); in kona_peri_clk_disable()
992 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_is_enabled() local
993 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_is_enabled()
995 return is_clk_gate_enabled(bcm_clk->ccu, gate) ? 1 : 0; in kona_peri_clk_is_enabled()
1001 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_recalc_rate() local
1002 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_recalc_rate()
1004 return clk_recalc_rate(bcm_clk->ccu, &data->div, &data->pre_div, in kona_peri_clk_recalc_rate()
1011 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_round_rate() local
1012 struct bcm_clk_div *div = &bcm_clk->u.peri->div; in kona_peri_clk_round_rate()
1018 return round_rate(bcm_clk->ccu, div, &bcm_clk->u.peri->pre_div, in kona_peri_clk_round_rate()
1025 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_determine_rate() local
1038 WARN_ON_ONCE(bcm_clk->init_data.flags & CLK_SET_RATE_NO_REPARENT); in kona_peri_clk_determine_rate()
1039 parent_count = (u32)bcm_clk->init_data.num_parents; in kona_peri_clk_determine_rate()
1085 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_set_parent() local
1086 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_set_parent()
1104 ret = selector_write(bcm_clk->ccu, &data->gate, sel, trig, index); in kona_peri_clk_set_parent()
1107 bcm_clk->init_data.name); in kona_peri_clk_set_parent()
1112 bcm_clk->init_data.name); in kona_peri_clk_set_parent()
1120 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_get_parent() local
1121 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_get_parent()
1124 index = selector_read_index(bcm_clk->ccu, &data->sel); in kona_peri_clk_get_parent()
1133 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_set_rate() local
1134 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_set_rate()
1161 (void)round_rate(bcm_clk->ccu, div, &data->pre_div, in kona_peri_clk_set_rate()
1168 ret = divider_write(bcm_clk->ccu, &data->gate, &data->div, in kona_peri_clk_set_rate()
1172 bcm_clk->init_data.name); in kona_peri_clk_set_rate()
1176 bcm_clk->init_data.name); in kona_peri_clk_set_rate()
1194 static bool __peri_clk_init(struct kona_clk *bcm_clk) in __peri_clk_init() argument
1196 struct ccu_data *ccu = bcm_clk->ccu; in __peri_clk_init()
1197 struct peri_clk_data *peri = bcm_clk->u.peri; in __peri_clk_init()
1198 const char *name = bcm_clk->init_data.name; in __peri_clk_init()
1201 BUG_ON(bcm_clk->type != bcm_clk_peri); in __peri_clk_init()
1244 static bool __kona_clk_init(struct kona_clk *bcm_clk) in __kona_clk_init() argument
1246 switch (bcm_clk->type) { in __kona_clk_init()
1248 return __peri_clk_init(bcm_clk); in __kona_clk_init()
1267 struct kona_clk *bcm_clk = &kona_clks[which]; in kona_ccu_init() local
1269 if (!bcm_clk->ccu) in kona_ccu_init()
1272 success &= __kona_clk_init(bcm_clk); in kona_ccu_init()