Lines Matching refs:p

18 	struct pistachio_clk_provider *p;  in pistachio_clk_alloc_provider()  local
20 p = kzalloc(sizeof(*p), GFP_KERNEL); in pistachio_clk_alloc_provider()
21 if (!p) in pistachio_clk_alloc_provider()
22 return p; in pistachio_clk_alloc_provider()
24 p->clk_data.clks = kcalloc(num_clks, sizeof(struct clk *), GFP_KERNEL); in pistachio_clk_alloc_provider()
25 if (!p->clk_data.clks) in pistachio_clk_alloc_provider()
27 p->clk_data.clk_num = num_clks; in pistachio_clk_alloc_provider()
28 p->node = node; in pistachio_clk_alloc_provider()
29 p->base = of_iomap(node, 0); in pistachio_clk_alloc_provider()
30 if (!p->base) { in pistachio_clk_alloc_provider()
35 return p; in pistachio_clk_alloc_provider()
38 kfree(p->clk_data.clks); in pistachio_clk_alloc_provider()
40 kfree(p); in pistachio_clk_alloc_provider()
44 void pistachio_clk_register_provider(struct pistachio_clk_provider *p) in pistachio_clk_register_provider() argument
48 for (i = 0; i < p->clk_data.clk_num; i++) { in pistachio_clk_register_provider()
49 if (IS_ERR(p->clk_data.clks[i])) in pistachio_clk_register_provider()
51 PTR_ERR(p->clk_data.clks[i])); in pistachio_clk_register_provider()
54 of_clk_add_provider(p->node, of_clk_src_onecell_get, &p->clk_data); in pistachio_clk_register_provider()
57 void pistachio_clk_register_gate(struct pistachio_clk_provider *p, in pistachio_clk_register_gate() argument
67 p->base + gate[i].reg, gate[i].shift, in pistachio_clk_register_gate()
69 p->clk_data.clks[gate[i].id] = clk; in pistachio_clk_register_gate()
73 void pistachio_clk_register_mux(struct pistachio_clk_provider *p, in pistachio_clk_register_mux() argument
84 p->base + mux[i].reg, mux[i].shift, in pistachio_clk_register_mux()
87 p->clk_data.clks[mux[i].id] = clk; in pistachio_clk_register_mux()
91 void pistachio_clk_register_div(struct pistachio_clk_provider *p, in pistachio_clk_register_div() argument
100 0, p->base + div[i].reg, 0, in pistachio_clk_register_div()
103 p->clk_data.clks[div[i].id] = clk; in pistachio_clk_register_div()
107 void pistachio_clk_register_fixed_factor(struct pistachio_clk_provider *p, in pistachio_clk_register_fixed_factor() argument
117 p->clk_data.clks[ff[i].id] = clk; in pistachio_clk_register_fixed_factor()
121 void pistachio_clk_force_enable(struct pistachio_clk_provider *p, in pistachio_clk_force_enable() argument
128 struct clk *clk = p->clk_data.clks[clk_ids[i]]; in pistachio_clk_force_enable()