Lines Matching refs:bcm_clk

968 	struct kona_clk *bcm_clk = to_kona_clk(hw);  in kona_peri_clk_enable()  local
969 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_enable()
971 return clk_gate(bcm_clk->ccu, bcm_clk->init_data.name, gate, true); in kona_peri_clk_enable()
976 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_disable() local
977 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_disable()
979 (void)clk_gate(bcm_clk->ccu, bcm_clk->init_data.name, gate, false); in kona_peri_clk_disable()
984 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_is_enabled() local
985 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_is_enabled()
987 return is_clk_gate_enabled(bcm_clk->ccu, gate) ? 1 : 0; in kona_peri_clk_is_enabled()
993 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_recalc_rate() local
994 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_recalc_rate()
996 return clk_recalc_rate(bcm_clk->ccu, &data->div, &data->pre_div, in kona_peri_clk_recalc_rate()
1003 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_round_rate() local
1004 struct bcm_clk_div *div = &bcm_clk->u.peri->div; in kona_peri_clk_round_rate()
1010 return round_rate(bcm_clk->ccu, div, &bcm_clk->u.peri->pre_div, in kona_peri_clk_round_rate()
1017 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_determine_rate() local
1030 WARN_ON_ONCE(bcm_clk->init_data.flags & CLK_SET_RATE_NO_REPARENT); in kona_peri_clk_determine_rate()
1031 parent_count = (u32)bcm_clk->init_data.num_parents; in kona_peri_clk_determine_rate()
1077 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_set_parent() local
1078 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_set_parent()
1096 ret = selector_write(bcm_clk->ccu, &data->gate, sel, trig, index); in kona_peri_clk_set_parent()
1099 bcm_clk->init_data.name); in kona_peri_clk_set_parent()
1104 bcm_clk->init_data.name); in kona_peri_clk_set_parent()
1112 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_get_parent() local
1113 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_get_parent()
1116 index = selector_read_index(bcm_clk->ccu, &data->sel); in kona_peri_clk_get_parent()
1125 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_set_rate() local
1126 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_set_rate()
1153 (void)round_rate(bcm_clk->ccu, div, &data->pre_div, in kona_peri_clk_set_rate()
1160 ret = divider_write(bcm_clk->ccu, &data->gate, &data->div, in kona_peri_clk_set_rate()
1164 bcm_clk->init_data.name); in kona_peri_clk_set_rate()
1168 bcm_clk->init_data.name); in kona_peri_clk_set_rate()
1186 static bool __peri_clk_init(struct kona_clk *bcm_clk) in __peri_clk_init() argument
1188 struct ccu_data *ccu = bcm_clk->ccu; in __peri_clk_init()
1189 struct peri_clk_data *peri = bcm_clk->u.peri; in __peri_clk_init()
1190 const char *name = bcm_clk->init_data.name; in __peri_clk_init()
1193 BUG_ON(bcm_clk->type != bcm_clk_peri); in __peri_clk_init()
1236 static bool __kona_clk_init(struct kona_clk *bcm_clk) in __kona_clk_init() argument
1238 switch (bcm_clk->type) { in __kona_clk_init()
1240 return __peri_clk_init(bcm_clk); in __kona_clk_init()
1259 struct kona_clk *bcm_clk = &kona_clks[which]; in kona_ccu_init() local
1261 if (!bcm_clk->ccu) in kona_ccu_init()
1264 success &= __kona_clk_init(bcm_clk); in kona_ccu_init()