[ARM] pxa: update defconfig for Verdex Pro
[linux-2.6/verdex.git] / arch / arm / mach-pxa / clock.h
blob978a3667e90dcd3548c2fc01fcbc82484c724686
1 #include <asm/clkdev.h>
3 struct clkops {
4 void (*enable)(struct clk *);
5 void (*disable)(struct clk *);
6 unsigned long (*getrate)(struct clk *);
7 };
9 struct clk {
10 const struct clkops *ops;
11 unsigned long rate;
12 unsigned int cken;
13 unsigned int delay;
14 unsigned int enabled;
17 #define INIT_CLKREG(_clk,_devname,_conname) \
18 { \
19 .clk = _clk, \
20 .dev_id = _devname, \
21 .con_id = _conname, \
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, \
32 #define DEFINE_CK(_name, _cken, _ops) \
33 struct clk clk_##_name = { \
34 .ops = _ops, \
35 .cken = CKEN_##_cken, \
38 #define DEFINE_CLK(_name, _ops, _rate, _delay) \
39 struct clk clk_##_name = { \
40 .ops = _ops, \
41 .rate = _rate, \
42 .delay = _delay, \
45 extern const struct clkops clk_cken_ops;
47 void clk_cken_enable(struct clk *clk);
48 void clk_cken_disable(struct clk *clk);
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, \
59 #define DEFINE_PXA3_CK(_name, _cken, _ops) \
60 struct clk clk_##_name = { \
61 .ops = _ops, \
62 .cken = CKEN_##_cken, \
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
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);