Staging: hv: mousevsc: Cleanup alloc_input_device()
[zen-stable.git] / arch / arm / mach-pxa / clock.h
blob3a258b1bf1aa46f39d255cb81a2643b667394192
1 #include <linux/clkdev.h>
2 #include <linux/syscore_ops.h>
4 struct clkops {
5 void (*enable)(struct clk *);
6 void (*disable)(struct clk *);
7 unsigned long (*getrate)(struct clk *);
8 int (*setrate)(struct clk *, unsigned long);
9 };
11 struct clk {
12 const struct clkops *ops;
13 unsigned long rate;
14 unsigned int cken;
15 unsigned int delay;
16 unsigned int enabled;
19 void clk_dummy_enable(struct clk *);
20 void clk_dummy_disable(struct clk *);
22 extern const struct clkops clk_dummy_ops;
23 extern struct clk clk_dummy;
25 #define INIT_CLKREG(_clk,_devname,_conname) \
26 { \
27 .clk = _clk, \
28 .dev_id = _devname, \
29 .con_id = _conname, \
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 #define DEFINE_PXA2_CKEN(_name, _cken, _rate, _delay) \
46 struct clk clk_##_name = { \
47 .ops = &clk_pxa2xx_cken_ops, \
48 .rate = _rate, \
49 .cken = CKEN_##_cken, \
50 .delay = _delay, \
53 extern const struct clkops clk_pxa2xx_cken_ops;
55 void clk_pxa2xx_cken_enable(struct clk *clk);
56 void clk_pxa2xx_cken_disable(struct clk *clk);
58 extern struct syscore_ops pxa2xx_clock_syscore_ops;
60 #if defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x)
61 #define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \
62 struct clk clk_##_name = { \
63 .ops = &clk_pxa3xx_cken_ops, \
64 .rate = _rate, \
65 .cken = CKEN_##_cken, \
66 .delay = _delay, \
69 extern const struct clkops clk_pxa3xx_cken_ops;
70 extern const struct clkops clk_pxa3xx_hsio_ops;
71 extern const struct clkops clk_pxa3xx_ac97_ops;
72 extern const struct clkops clk_pxa3xx_pout_ops;
73 extern const struct clkops clk_pxa3xx_smemc_ops;
75 extern void clk_pxa3xx_cken_enable(struct clk *);
76 extern void clk_pxa3xx_cken_disable(struct clk *);
78 extern struct syscore_ops pxa3xx_clock_syscore_ops;
80 #endif