Lines Matching refs:cpg
53 r8a7778_cpg_register_clock(struct device_node *np, struct r8a7778_cpg *cpg, in r8a7778_cpg_register_clock() argument
83 struct r8a7778_cpg *cpg; in r8a7778_cpg_clocks_init() local
106 cpg = kzalloc(sizeof(*cpg), GFP_KERNEL); in r8a7778_cpg_clocks_init()
108 if (cpg == NULL || clks == NULL) { in r8a7778_cpg_clocks_init()
115 spin_lock_init(&cpg->lock); in r8a7778_cpg_clocks_init()
117 cpg->data.clks = clks; in r8a7778_cpg_clocks_init()
118 cpg->data.clk_num = num_clks; in r8a7778_cpg_clocks_init()
120 cpg->reg = of_iomap(np, 0); in r8a7778_cpg_clocks_init()
121 if (WARN_ON(cpg->reg == NULL)) in r8a7778_cpg_clocks_init()
131 clk = r8a7778_cpg_register_clock(np, cpg, name); in r8a7778_cpg_clocks_init()
136 cpg->data.clks[i] = clk; in r8a7778_cpg_clocks_init()
139 of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); in r8a7778_cpg_clocks_init()