Lines Matching refs:ad

36 	struct dpll_data *ad;
41 ad = clk->dpll_data;
42 if (!ad)
47 state <<= __ffs(ad->idlest_mask);
50 v = ti_clk_ll_ops->clk_readl(&ad->idlest_reg);
52 if ((v & ad->idlest_mask) == state)
55 v = ti_clk_ll_ops->clk_readl(&ad->control_reg);
56 v &= ~ad->enable_mask;
57 v |= APLL_FORCE_LOCK << __ffs(ad->enable_mask);
58 ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
60 state <<= __ffs(ad->idlest_mask);
63 v = ti_clk_ll_ops->clk_readl(&ad->idlest_reg);
64 if ((v & ad->idlest_mask) == state)
86 struct dpll_data *ad;
90 ad = clk->dpll_data;
92 state <<= __ffs(ad->idlest_mask);
94 v = ti_clk_ll_ops->clk_readl(&ad->control_reg);
95 v &= ~ad->enable_mask;
96 v |= APLL_AUTO_IDLE << __ffs(ad->enable_mask);
97 ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
103 struct dpll_data *ad;
106 ad = clk->dpll_data;
108 v = ti_clk_ll_ops->clk_readl(&ad->control_reg);
109 v &= ad->enable_mask;
111 v >>= __ffs(ad->enable_mask);
133 struct dpll_data *ad = clk_hw->dpll_data;
148 ad->clk_ref = __clk_get_hw(clk);
160 ad->clk_bypass = __clk_get_hw(clk);
180 struct dpll_data *ad = NULL;
186 ad = kzalloc(sizeof(*ad), GFP_KERNEL);
189 if (!ad || !clk_hw || !init)
192 clk_hw->dpll_data = ad;
212 ret = ti_clk_get_reg_addr(node, 0, &ad->control_reg);
213 ret |= ti_clk_get_reg_addr(node, 1, &ad->idlest_reg);
218 ad->idlest_mask = 0x1;
219 ad->enable_mask = 0x3;
226 kfree(ad);
238 struct dpll_data *ad = clk->dpll_data;
241 v = ti_clk_ll_ops->clk_readl(&ad->control_reg);
242 v &= ad->enable_mask;
244 v >>= __ffs(ad->enable_mask);
263 struct dpll_data *ad = clk->dpll_data;
267 v = ti_clk_ll_ops->clk_readl(&ad->control_reg);
268 v &= ~ad->enable_mask;
269 v |= OMAP2_EN_APLL_LOCKED << __ffs(ad->enable_mask);
270 ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
273 v = ti_clk_ll_ops->clk_readl(&ad->idlest_reg);
274 if (v & ad->idlest_mask)
294 struct dpll_data *ad = clk->dpll_data;
297 v = ti_clk_ll_ops->clk_readl(&ad->control_reg);
298 v &= ~ad->enable_mask;
299 v |= OMAP2_EN_APLL_STOPPED << __ffs(ad->enable_mask);
300 ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
312 struct dpll_data *ad = clk->dpll_data;
315 v = ti_clk_ll_ops->clk_readl(&ad->autoidle_reg);
316 v &= ~ad->autoidle_mask;
317 v |= val << __ffs(ad->autoidle_mask);
318 ti_clk_ll_ops->clk_writel(v, &ad->control_reg);
341 struct dpll_data *ad = NULL;
350 ad = kzalloc(sizeof(*ad), GFP_KERNEL);
354 if (!ad || !clk_hw || !init)
357 clk_hw->dpll_data = ad;
380 ad->enable_mask = 0x3 << clk_hw->enable_bit;
381 ad->autoidle_mask = 0x3 << clk_hw->enable_bit;
388 ad->idlest_mask = 1 << val;
390 ret = ti_clk_get_reg_addr(node, 0, &ad->control_reg);
391 ret |= ti_clk_get_reg_addr(node, 1, &ad->autoidle_reg);
392 ret |= ti_clk_get_reg_addr(node, 2, &ad->idlest_reg);
405 kfree(ad);