x86, mtrr: Constify struct mtrr_ops
[deliverable/linux.git] / arch / arm / mach-pxa / clock.h
1 #include <asm/clkdev.h>
2
3 struct clkops {
4 void (*enable)(struct clk *);
5 void (*disable)(struct clk *);
6 unsigned long (*getrate)(struct clk *);
7 };
8
9 struct clk {
10 const struct clkops *ops;
11 unsigned long rate;
12 unsigned int cken;
13 unsigned int delay;
14 unsigned int enabled;
15 };
16
17 #define INIT_CLKREG(_clk,_devname,_conname) \
18 { \
19 .clk = _clk, \
20 .dev_id = _devname, \
21 .con_id = _conname, \
22 }
23
24 #define DEFINE_CKEN(_name, _cken, _rate, _delay) \
25 struct clk clk_##_name = { \
26 .ops = &clk_cken_ops, \
27 .rate = _rate, \
28 .cken = CKEN_##_cken, \
29 .delay = _delay, \
30 }
31
32 #define DEFINE_CK(_name, _cken, _ops) \
33 struct clk clk_##_name = { \
34 .ops = _ops, \
35 .cken = CKEN_##_cken, \
36 }
37
38 #define DEFINE_CLK(_name, _ops, _rate, _delay) \
39 struct clk clk_##_name = { \
40 .ops = _ops, \
41 .rate = _rate, \
42 .delay = _delay, \
43 }
44
45 extern const struct clkops clk_cken_ops;
46
47 void clk_cken_enable(struct clk *clk);
48 void clk_cken_disable(struct clk *clk);
49
50 #ifdef CONFIG_PXA3xx
51 #define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \
52 struct clk clk_##_name = { \
53 .ops = &clk_pxa3xx_cken_ops, \
54 .rate = _rate, \
55 .cken = CKEN_##_cken, \
56 .delay = _delay, \
57 }
58
59 #define DEFINE_PXA3_CK(_name, _cken, _ops) \
60 struct clk clk_##_name = { \
61 .ops = _ops, \
62 .cken = CKEN_##_cken, \
63 }
64
65 extern const struct clkops clk_pxa3xx_cken_ops;
66 extern void clk_pxa3xx_cken_enable(struct clk *);
67 extern void clk_pxa3xx_cken_disable(struct clk *);
68 #endif
69
70 void clks_register(struct clk_lookup *clks, size_t num);
71 int clk_add_alias(const char *alias, const char *alias_name, char *id,
72 struct device *dev);
73
This page took 0.033564 seconds and 5 git commands to generate.