Lines Matching refs:cpg
63 r8a73a4_cpg_register_clock(struct device_node *np, struct r8a73a4_cpg *cpg, in r8a73a4_cpg_register_clock() argument
74 u32 ckscr = readl(cpg->reg + CPG_CKSCR); in r8a73a4_cpg_register_clock()
98 u32 value = readl(cpg->reg + CPG_PLL0CR); in r8a73a4_cpg_register_clock()
105 u32 value = readl(cpg->reg + CPG_PLL1CR); in r8a73a4_cpg_register_clock()
128 value = readl(cpg->reg + cr); in r8a73a4_cpg_register_clock()
164 mult = 0x20 - ((readl(cpg->reg + CPG_FRQCRC) >> shift) & 0x1f); in r8a73a4_cpg_register_clock()
186 cpg->reg + reg, shift, 4, 0, in r8a73a4_cpg_register_clock()
187 table, &cpg->lock); in r8a73a4_cpg_register_clock()
193 struct r8a73a4_cpg *cpg; in r8a73a4_cpg_clocks_init() local
204 cpg = kzalloc(sizeof(*cpg), GFP_KERNEL); in r8a73a4_cpg_clocks_init()
206 if (cpg == NULL || clks == NULL) { in r8a73a4_cpg_clocks_init()
213 spin_lock_init(&cpg->lock); in r8a73a4_cpg_clocks_init()
215 cpg->data.clks = clks; in r8a73a4_cpg_clocks_init()
216 cpg->data.clk_num = num_clks; in r8a73a4_cpg_clocks_init()
218 cpg->reg = of_iomap(np, 0); in r8a73a4_cpg_clocks_init()
219 if (WARN_ON(cpg->reg == NULL)) in r8a73a4_cpg_clocks_init()
229 clk = r8a73a4_cpg_register_clock(np, cpg, name); in r8a73a4_cpg_clocks_init()
234 cpg->data.clks[i] = clk; in r8a73a4_cpg_clocks_init()
237 of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); in r8a73a4_cpg_clocks_init()