aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/clock.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-08-20 05:18:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-10-12 16:14:55 -0400
commita6dba20c5c7b3a18d69bcbd60a1d2ebc0536f0ce (patch)
tree954e4f3aa86f730fc4b8834126e7886022c0dccf /arch/arm/mach-pxa/clock.h
parent00dc4f949e7423769de1a160c590840534ea3a70 (diff)
[ARM] pxa: introduce clk support for PXA SoC clocks
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);