diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-08-20 11:18:02 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-10-12 22:14:55 +0200 |
commit | a6dba20c5c7b3a18d69bcbd60a1d2ebc0536f0ce (patch) | |
tree | 954e4f3aa86f730fc4b8834126e7886022c0dccf /arch/arm/mach-pxa/clock.h | |
parent | [ARM] pxa: make pxa27x devices globally visible (diff) | |
download | linux-a6dba20c5c7b3a18d69bcbd60a1d2ebc0536f0ce.tar.xz linux-a6dba20c5c7b3a18d69bcbd60a1d2ebc0536f0ce.zip |
[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.h | 43 |
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 @@ +struct clk; + +struct clkops { + void (*enable)(struct clk *); + void (*disable)(struct clk *); + unsigned long (*getrate)(struct clk *); +}; + +struct clk { + struct list_head node; + const char *name; + struct device *dev; + const struct clkops *ops; + unsigned long rate; + unsigned int cken; + unsigned int delay; + unsigned int enabled; +}; + +#define INIT_CKEN(_name, _cken, _rate, _delay, _dev) \ + { \ + .name = _name, \ + .dev = _dev, \ + .ops = &clk_cken_ops, \ + .rate = _rate, \ + .cken = CKEN_##_cken, \ + .delay = _delay, \ + } + +#define INIT_CK(_name, _cken, _ops, _dev) \ + { \ + .name = _name, \ + .dev = _dev, \ + .ops = _ops, \ + .cken = CKEN_##_cken, \ + } + +extern const struct clkops clk_cken_ops; + +void clk_cken_enable(struct clk *clk); +void clk_cken_disable(struct clk *clk); + +void clks_register(struct clk *clks, size_t num); |