diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-11-04 09:02:46 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-02 09:52:18 -0500 |
commit | 548d849574847b788fe846fe21a41386063be161 (patch) | |
tree | 6c2ac7379c376793368affab03e5202abd0f1efa /arch/arm/plat-omap/include/mach/clock.h | |
parent | db8ac47cfccaafd3fa4c5c15320809d44f4fcef9 (diff) |
[ARM] omap: introduce clock operations structure
Collect up all the common enable/disable clock operation functions
into a separate operations structure.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/include/mach/clock.h')
-rw-r--r-- | arch/arm/plat-omap/include/mach/clock.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h index 4e8f59df30bd..4fe5084e8cc2 100644 --- a/arch/arm/plat-omap/include/mach/clock.h +++ b/arch/arm/plat-omap/include/mach/clock.h | |||
@@ -17,6 +17,11 @@ struct module; | |||
17 | struct clk; | 17 | struct clk; |
18 | struct clockdomain; | 18 | struct clockdomain; |
19 | 19 | ||
20 | struct clkops { | ||
21 | int (*enable)(struct clk *); | ||
22 | void (*disable)(struct clk *); | ||
23 | }; | ||
24 | |||
20 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 25 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
21 | 26 | ||
22 | struct clksel_rate { | 27 | struct clksel_rate { |
@@ -59,6 +64,7 @@ struct dpll_data { | |||
59 | 64 | ||
60 | struct clk { | 65 | struct clk { |
61 | struct list_head node; | 66 | struct list_head node; |
67 | const struct clkops *ops; | ||
62 | struct module *owner; | 68 | struct module *owner; |
63 | const char *name; | 69 | const char *name; |
64 | int id; | 70 | int id; |
@@ -72,8 +78,6 @@ struct clk { | |||
72 | int (*set_rate)(struct clk *, unsigned long); | 78 | int (*set_rate)(struct clk *, unsigned long); |
73 | long (*round_rate)(struct clk *, unsigned long); | 79 | long (*round_rate)(struct clk *, unsigned long); |
74 | void (*init)(struct clk *); | 80 | void (*init)(struct clk *); |
75 | int (*enable)(struct clk *); | ||
76 | void (*disable)(struct clk *); | ||
77 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 81 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
78 | u8 fixed_div; | 82 | u8 fixed_div; |
79 | void __iomem *clksel_reg; | 83 | void __iomem *clksel_reg; |