Lines Matching refs:clk
31 void __clk_init_enabled(struct clk *clk) in __clk_init_enabled() argument
33 clk->enabled = 1; in __clk_init_enabled()
34 clk->clk_ops->enable(clk); in __clk_init_enabled()
37 void __clk_init_disabled(struct clk *clk) in __clk_init_disabled() argument
39 clk->enabled = 0; in __clk_init_disabled()
40 clk->clk_ops->disable(clk); in __clk_init_disabled()
43 static void __clk_enable0(struct clk *clk) in __clk_enable0() argument
45 __raw_writeb(clk->slot, MCFPM_PPMCR0); in __clk_enable0()
48 static void __clk_disable0(struct clk *clk) in __clk_disable0() argument
50 __raw_writeb(clk->slot, MCFPM_PPMSR0); in __clk_disable0()
59 static void __clk_enable1(struct clk *clk) in __clk_enable1() argument
61 __raw_writeb(clk->slot, MCFPM_PPMCR1); in __clk_enable1()
64 static void __clk_disable1(struct clk *clk) in __clk_disable1() argument
66 __raw_writeb(clk->slot, MCFPM_PPMSR1); in __clk_disable1()
76 int clk_enable(struct clk *clk) in clk_enable() argument
80 if (!clk) in clk_enable()
84 if ((clk->enabled++ == 0) && clk->clk_ops) in clk_enable()
85 clk->clk_ops->enable(clk); in clk_enable()
92 void clk_disable(struct clk *clk) in clk_disable() argument
96 if (!clk) in clk_disable()
100 if ((--clk->enabled == 0) && clk->clk_ops) in clk_disable()
101 clk->clk_ops->disable(clk); in clk_disable()
106 unsigned long clk_get_rate(struct clk *clk) in clk_get_rate() argument
108 if (!clk) in clk_get_rate()
111 return clk->rate; in clk_get_rate()
116 long clk_round_rate(struct clk *clk, unsigned long rate) in clk_round_rate() argument
118 WARN_ON(clk); in clk_round_rate()
123 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument
125 WARN_ON(clk); in clk_set_rate()
130 int clk_set_parent(struct clk *clk, struct clk *parent) in clk_set_parent() argument
132 WARN_ON(clk); in clk_set_parent()
137 struct clk *clk_get_parent(struct clk *clk) in clk_get_parent() argument
139 WARN_ON(clk); in clk_get_parent()