Lines Matching refs:bcm_clk

975 	struct kona_clk *bcm_clk = to_kona_clk(hw);  in kona_peri_clk_enable()  local
976 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_enable()
978 return clk_gate(bcm_clk->ccu, bcm_clk->init_data.name, gate, true); in kona_peri_clk_enable()
983 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_disable() local
984 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_disable()
986 (void)clk_gate(bcm_clk->ccu, bcm_clk->init_data.name, gate, false); in kona_peri_clk_disable()
991 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_is_enabled() local
992 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_is_enabled()
994 return is_clk_gate_enabled(bcm_clk->ccu, gate) ? 1 : 0; in kona_peri_clk_is_enabled()
1000 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_recalc_rate() local
1001 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_recalc_rate()
1003 return clk_recalc_rate(bcm_clk->ccu, &data->div, &data->pre_div, in kona_peri_clk_recalc_rate()
1010 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_round_rate() local
1011 struct bcm_clk_div *div = &bcm_clk->u.peri->div; in kona_peri_clk_round_rate()
1017 return round_rate(bcm_clk->ccu, div, &bcm_clk->u.peri->pre_div, in kona_peri_clk_round_rate()
1024 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_determine_rate() local
1037 WARN_ON_ONCE(bcm_clk->init_data.flags & CLK_SET_RATE_NO_REPARENT); in kona_peri_clk_determine_rate()
1038 parent_count = (u32)bcm_clk->init_data.num_parents; in kona_peri_clk_determine_rate()
1084 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_set_parent() local
1085 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_set_parent()
1103 ret = selector_write(bcm_clk->ccu, &data->gate, sel, trig, index); in kona_peri_clk_set_parent()
1106 bcm_clk->init_data.name); in kona_peri_clk_set_parent()
1111 bcm_clk->init_data.name); in kona_peri_clk_set_parent()
1119 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_get_parent() local
1120 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_get_parent()
1123 index = selector_read_index(bcm_clk->ccu, &data->sel); in kona_peri_clk_get_parent()
1132 struct kona_clk *bcm_clk = to_kona_clk(hw); in kona_peri_clk_set_rate() local
1133 struct peri_clk_data *data = bcm_clk->u.peri; in kona_peri_clk_set_rate()
1160 (void)round_rate(bcm_clk->ccu, div, &data->pre_div, in kona_peri_clk_set_rate()
1167 ret = divider_write(bcm_clk->ccu, &data->gate, &data->div, in kona_peri_clk_set_rate()
1171 bcm_clk->init_data.name); in kona_peri_clk_set_rate()
1175 bcm_clk->init_data.name); in kona_peri_clk_set_rate()
1193 static bool __peri_clk_init(struct kona_clk *bcm_clk) in __peri_clk_init() argument
1195 struct ccu_data *ccu = bcm_clk->ccu; in __peri_clk_init()
1196 struct peri_clk_data *peri = bcm_clk->u.peri; in __peri_clk_init()
1197 const char *name = bcm_clk->init_data.name; in __peri_clk_init()
1200 BUG_ON(bcm_clk->type != bcm_clk_peri); in __peri_clk_init()
1243 static bool __kona_clk_init(struct kona_clk *bcm_clk) in __kona_clk_init() argument
1245 switch (bcm_clk->type) { in __kona_clk_init()
1247 return __peri_clk_init(bcm_clk); in __kona_clk_init()
1266 struct kona_clk *bcm_clk = &kona_clks[which]; in kona_ccu_init() local
1268 if (!bcm_clk->ccu) in kona_ccu_init()
1271 success &= __kona_clk_init(bcm_clk); in kona_ccu_init()