Lines Matching refs:div_init
573 struct ccu_div *ccu_div_hw_register(const struct ccu_div_init_data *div_init) in ccu_div_hw_register() argument
580 if (!div_init) in ccu_div_hw_register()
593 div->id = div_init->id; in ccu_div_hw_register()
594 div->reg_ctl = div_init->base + CCU_DIV_CTL; in ccu_div_hw_register()
595 div->sys_regs = div_init->sys_regs; in ccu_div_hw_register()
596 div->flags = div_init->flags; in ccu_div_hw_register()
597 div->features = div_init->features; in ccu_div_hw_register()
600 hw_init.name = div_init->name; in ccu_div_hw_register()
601 hw_init.flags = div_init->flags; in ccu_div_hw_register()
603 if (div_init->type == CCU_DIV_VAR) { in ccu_div_hw_register()
608 div->mask = CCU_DIV_CTL_CLKDIV_MASK(div_init->width); in ccu_div_hw_register()
609 } else if (div_init->type == CCU_DIV_GATE) { in ccu_div_hw_register()
611 div->divider = div_init->divider; in ccu_div_hw_register()
612 } else if (div_init->type == CCU_DIV_BUF) { in ccu_div_hw_register()
614 } else if (div_init->type == CCU_DIV_FIXED) { in ccu_div_hw_register()
616 div->divider = div_init->divider; in ccu_div_hw_register()
622 if (!div_init->parent_name) { in ccu_div_hw_register()
626 parent_data.fw_name = div_init->parent_name; in ccu_div_hw_register()
627 parent_data.name = div_init->parent_name; in ccu_div_hw_register()
631 ret = of_clk_hw_register(div_init->np, &div->hw); in ccu_div_hw_register()