Lines Matching refs:ddiv

394 	struct lgm_clk_ddiv *ddiv = to_lgm_clk_ddiv(hw);  in lgm_clk_ddiv_recalc_rate()  local
398 div0 = lgm_get_clk_val(ddiv->membase, ddiv->reg, in lgm_clk_ddiv_recalc_rate()
399 ddiv->shift0, ddiv->width0) + 1; in lgm_clk_ddiv_recalc_rate()
400 div1 = lgm_get_clk_val(ddiv->membase, ddiv->reg, in lgm_clk_ddiv_recalc_rate()
401 ddiv->shift1, ddiv->width1) + 1; in lgm_clk_ddiv_recalc_rate()
402 exdiv = lgm_get_clk_val(ddiv->membase, ddiv->reg, in lgm_clk_ddiv_recalc_rate()
403 ddiv->shift2, ddiv->width2); in lgm_clk_ddiv_recalc_rate()
409 do_div(prate, ddiv->div); in lgm_clk_ddiv_recalc_rate()
410 prate *= ddiv->mult; in lgm_clk_ddiv_recalc_rate()
418 struct lgm_clk_ddiv *ddiv = to_lgm_clk_ddiv(hw); in lgm_clk_ddiv_enable() local
420 lgm_set_clk_val(ddiv->membase, ddiv->reg, ddiv->shift_gate, in lgm_clk_ddiv_enable()
421 ddiv->width_gate, 1); in lgm_clk_ddiv_enable()
427 struct lgm_clk_ddiv *ddiv = to_lgm_clk_ddiv(hw); in lgm_clk_ddiv_disable() local
429 lgm_set_clk_val(ddiv->membase, ddiv->reg, ddiv->shift_gate, in lgm_clk_ddiv_disable()
430 ddiv->width_gate, 0); in lgm_clk_ddiv_disable()
465 struct lgm_clk_ddiv *ddiv = to_lgm_clk_ddiv(hw); in lgm_clk_ddiv_set_rate() local
470 if (lgm_get_clk_val(ddiv->membase, ddiv->reg, ddiv->shift2, 1)) { in lgm_clk_ddiv_set_rate()
481 lgm_set_clk_val(ddiv->membase, ddiv->reg, ddiv->shift0, ddiv->width0, in lgm_clk_ddiv_set_rate()
484 lgm_set_clk_val(ddiv->membase, ddiv->reg, ddiv->shift1, ddiv->width1, in lgm_clk_ddiv_set_rate()
494 struct lgm_clk_ddiv *ddiv = to_lgm_clk_ddiv(hw); in lgm_clk_ddiv_round_rate() local
501 if (lgm_get_clk_val(ddiv->membase, ddiv->reg, ddiv->shift2, 1)) { in lgm_clk_ddiv_round_rate()
518 if (lgm_get_clk_val(ddiv->membase, ddiv->reg, ddiv->shift2, 1)) { in lgm_clk_ddiv_round_rate()
545 struct lgm_clk_ddiv *ddiv; in lgm_clk_register_ddiv() local
547 ddiv = devm_kzalloc(dev, sizeof(*ddiv), GFP_KERNEL); in lgm_clk_register_ddiv()
548 if (!ddiv) in lgm_clk_register_ddiv()
557 ddiv->membase = ctx->membase; in lgm_clk_register_ddiv()
558 ddiv->reg = list->reg; in lgm_clk_register_ddiv()
559 ddiv->shift0 = list->shift0; in lgm_clk_register_ddiv()
560 ddiv->width0 = list->width0; in lgm_clk_register_ddiv()
561 ddiv->shift1 = list->shift1; in lgm_clk_register_ddiv()
562 ddiv->width1 = list->width1; in lgm_clk_register_ddiv()
563 ddiv->shift_gate = list->shift_gate; in lgm_clk_register_ddiv()
564 ddiv->width_gate = list->width_gate; in lgm_clk_register_ddiv()
565 ddiv->shift2 = list->ex_shift; in lgm_clk_register_ddiv()
566 ddiv->width2 = list->ex_width; in lgm_clk_register_ddiv()
567 ddiv->flags = list->div_flags; in lgm_clk_register_ddiv()
568 ddiv->mult = 2; in lgm_clk_register_ddiv()
569 ddiv->div = 5; in lgm_clk_register_ddiv()
570 ddiv->hw.init = &init; in lgm_clk_register_ddiv()
572 hw = &ddiv->hw; in lgm_clk_register_ddiv()