aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/clock.h')
-rw-r--r--arch/arm/mach-pxa/clock.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h
new file mode 100644
index 000000000000..bc6b77e1592e
--- /dev/null
+++ b/arch/arm/mach-pxa/clock.h
@@ -0,0 +1,43 @@
1struct clk;
2
3struct clkops {
4 void (*enable)(struct clk *);
5 void (*disable)(struct clk *);
6 unsigned long (*getrate)(struct clk *);
7};
8
9struct clk {
10 struct list_head node;
11 const char *name;
12 struct device *dev;
13 const struct clkops *ops;
14 unsigned long rate;
15 unsigned int cken;
16 unsigned int delay;
17 unsigned int enabled;
18};
19
20#define INIT_CKEN(_name, _cken, _rate, _delay, _dev) \
21 { \
22 .name = _name, \
23 .dev = _dev, \
24 .ops = &clk_cken_ops, \
25 .rate = _rate, \
26 .cken = CKEN_##_cken, \
27 .delay = _delay, \
28 }
29
30#define INIT_CK(_name, _cken, _ops, _dev) \
31 { \
32 .name = _name, \
33 .dev = _dev, \
34 .ops = _ops, \
35 .cken = CKEN_##_cken, \
36 }
37
38extern const struct clkops clk_cken_ops;
39
40void clk_cken_enable(struct clk *clk);
41void clk_cken_disable(struct clk *clk);
42
43void clks_register(struct clk *clks, size_t num);