• Home
  • Raw
  • Download

Lines Matching refs:clk

39 static int _omap2_clk_deny_idle(struct clk_hw_omap *clk)  in _omap2_clk_deny_idle()  argument
41 if (clk->ops && clk->ops->deny_idle) { in _omap2_clk_deny_idle()
45 clk->autoidle_count++; in _omap2_clk_deny_idle()
46 if (clk->autoidle_count == 1) in _omap2_clk_deny_idle()
47 clk->ops->deny_idle(clk); in _omap2_clk_deny_idle()
54 static int _omap2_clk_allow_idle(struct clk_hw_omap *clk) in _omap2_clk_allow_idle() argument
56 if (clk->ops && clk->ops->allow_idle) { in _omap2_clk_allow_idle()
60 clk->autoidle_count--; in _omap2_clk_allow_idle()
61 if (clk->autoidle_count == 0) in _omap2_clk_allow_idle()
62 clk->ops->allow_idle(clk); in _omap2_clk_allow_idle()
75 int omap2_clk_deny_idle(struct clk *clk) in omap2_clk_deny_idle() argument
79 if (!clk) in omap2_clk_deny_idle()
82 hw = __clk_get_hw(clk); in omap2_clk_deny_idle()
99 int omap2_clk_allow_idle(struct clk *clk) in omap2_clk_allow_idle() argument
103 if (!clk) in omap2_clk_allow_idle()
106 hw = __clk_get_hw(clk); in omap2_clk_allow_idle()
117 static void _allow_autoidle(struct clk_ti_autoidle *clk) in _allow_autoidle() argument
121 val = ti_clk_ll_ops->clk_readl(&clk->reg); in _allow_autoidle()
123 if (clk->flags & AUTOIDLE_LOW) in _allow_autoidle()
124 val &= ~(1 << clk->shift); in _allow_autoidle()
126 val |= (1 << clk->shift); in _allow_autoidle()
128 ti_clk_ll_ops->clk_writel(val, &clk->reg); in _allow_autoidle()
131 static void _deny_autoidle(struct clk_ti_autoidle *clk) in _deny_autoidle() argument
135 val = ti_clk_ll_ops->clk_readl(&clk->reg); in _deny_autoidle()
137 if (clk->flags & AUTOIDLE_LOW) in _deny_autoidle()
138 val |= (1 << clk->shift); in _deny_autoidle()
140 val &= ~(1 << clk->shift); in _deny_autoidle()
142 ti_clk_ll_ops->clk_writel(val, &clk->reg); in _deny_autoidle()
187 struct clk_ti_autoidle *clk; in of_ti_clk_autoidle_setup() local
194 clk = kzalloc(sizeof(*clk), GFP_KERNEL); in of_ti_clk_autoidle_setup()
196 if (!clk) in of_ti_clk_autoidle_setup()
199 clk->shift = shift; in of_ti_clk_autoidle_setup()
200 clk->name = ti_dt_clk_name(node); in of_ti_clk_autoidle_setup()
201 ret = ti_clk_get_reg_addr(node, 0, &clk->reg); in of_ti_clk_autoidle_setup()
203 kfree(clk); in of_ti_clk_autoidle_setup()
208 clk->flags |= AUTOIDLE_LOW; in of_ti_clk_autoidle_setup()
210 list_add(&clk->node, &autoidle_clks); in of_ti_clk_autoidle_setup()