Lines Matching full:asiu
20 struct iproc_asiu *asiu; member
39 struct iproc_asiu *asiu = clk->asiu; in iproc_asiu_clk_enable() local
42 /* some clocks at the ASIU level are always enabled */ in iproc_asiu_clk_enable()
46 val = readl(asiu->gate_base + clk->gate.offset); in iproc_asiu_clk_enable()
48 writel(val, asiu->gate_base + clk->gate.offset); in iproc_asiu_clk_enable()
56 struct iproc_asiu *asiu = clk->asiu; in iproc_asiu_clk_disable() local
59 /* some clocks at the ASIU level are always enabled */ in iproc_asiu_clk_disable()
63 val = readl(asiu->gate_base + clk->gate.offset); in iproc_asiu_clk_disable()
65 writel(val, asiu->gate_base + clk->gate.offset); in iproc_asiu_clk_disable()
72 struct iproc_asiu *asiu = clk->asiu; in iproc_asiu_clk_recalc_rate() local
82 val = readl(asiu->div_base + clk->div.offset); in iproc_asiu_clk_recalc_rate()
123 struct iproc_asiu *asiu = clk->asiu; in iproc_asiu_clk_set_rate() local
132 val = readl(asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
134 writel(val, asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
146 val = readl(asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
162 writel(val, asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
181 struct iproc_asiu *asiu; in iproc_asiu_setup() local
186 asiu = kzalloc(sizeof(*asiu), GFP_KERNEL); in iproc_asiu_setup()
187 if (WARN_ON(!asiu)) in iproc_asiu_setup()
190 asiu->clk_data = kzalloc(struct_size(asiu->clk_data, hws, num_clks), in iproc_asiu_setup()
192 if (WARN_ON(!asiu->clk_data)) in iproc_asiu_setup()
194 asiu->clk_data->num = num_clks; in iproc_asiu_setup()
196 asiu->clks = kcalloc(num_clks, sizeof(*asiu->clks), GFP_KERNEL); in iproc_asiu_setup()
197 if (WARN_ON(!asiu->clks)) in iproc_asiu_setup()
200 asiu->div_base = of_iomap(node, 0); in iproc_asiu_setup()
201 if (WARN_ON(!asiu->div_base)) in iproc_asiu_setup()
204 asiu->gate_base = of_iomap(node, 1); in iproc_asiu_setup()
205 if (WARN_ON(!asiu->gate_base)) in iproc_asiu_setup()
219 asiu_clk = &asiu->clks[i]; in iproc_asiu_setup()
221 asiu_clk->asiu = asiu; in iproc_asiu_setup()
235 asiu->clk_data->hws[i] = &asiu_clk->hw; in iproc_asiu_setup()
239 asiu->clk_data); in iproc_asiu_setup()
247 clk_hw_unregister(asiu->clk_data->hws[i]); in iproc_asiu_setup()
248 iounmap(asiu->gate_base); in iproc_asiu_setup()
251 iounmap(asiu->div_base); in iproc_asiu_setup()
254 kfree(asiu->clks); in iproc_asiu_setup()
257 kfree(asiu->clk_data); in iproc_asiu_setup()
260 kfree(asiu); in iproc_asiu_setup()