diff options
author | Rajendra Nayak <rnayak@ti.com> | 2011-02-25 18:06:47 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2011-02-25 18:06:47 -0500 |
commit | 32d4034eea9c5c2b2edc365e1a0787c8f5b84c3c (patch) | |
tree | 688c5a025999ec237ea6d5c8fbae2f018095fc82 /arch/arm/mach-omap2/clockdomain.h | |
parent | 3673d1ef5dc94d8b942c33fe1895a0ff52efbc3c (diff) |
OMAP: clockdomain: Infrastructure to put arch specific code
Put infrastructure in place, so arch specific func pointers
can be hooked up to the platform-independent part of the
framework.
This is in preparation of splitting the clockdomain framework into
platform-independent part (for all omaps) and platform-specific
parts.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.h')
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 9b459c26fb85..71ad265cf133 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -116,7 +116,42 @@ struct clockdomain { | |||
116 | struct list_head node; | 116 | struct list_head node; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps); | 119 | /** |
120 | * struct clkdm_ops - Arch specfic function implementations | ||
121 | * @clkdm_add_wkdep: Add a wakeup dependency between clk domains | ||
122 | * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains | ||
123 | * @clkdm_read_wkdep: Read wakeup dependency state between clk domains | ||
124 | * @clkdm_clear_all_wkdeps: Remove all wakeup dependencies from the clk domain | ||
125 | * @clkdm_add_sleepdep: Add a sleep dependency between clk domains | ||
126 | * @clkdm_del_sleepdep: Delete a sleep dependency between clk domains | ||
127 | * @clkdm_read_sleepdep: Read sleep dependency state between clk domains | ||
128 | * @clkdm_clear_all_sleepdeps: Remove all sleep dependencies from the clk domain | ||
129 | * @clkdm_sleep: Force a clockdomain to sleep | ||
130 | * @clkdm_wakeup: Force a clockdomain to wakeup | ||
131 | * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain | ||
132 | * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain | ||
133 | * @clkdm_clk_enable: Put the clkdm in right state for a clock enable | ||
134 | * @clkdm_clk_disable: Put the clkdm in right state for a clock disable | ||
135 | */ | ||
136 | struct clkdm_ops { | ||
137 | int (*clkdm_add_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
138 | int (*clkdm_del_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
139 | int (*clkdm_read_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
140 | int (*clkdm_clear_all_wkdeps)(struct clockdomain *clkdm); | ||
141 | int (*clkdm_add_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
142 | int (*clkdm_del_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
143 | int (*clkdm_read_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
144 | int (*clkdm_clear_all_sleepdeps)(struct clockdomain *clkdm); | ||
145 | int (*clkdm_sleep)(struct clockdomain *clkdm); | ||
146 | int (*clkdm_wakeup)(struct clockdomain *clkdm); | ||
147 | void (*clkdm_allow_idle)(struct clockdomain *clkdm); | ||
148 | void (*clkdm_deny_idle)(struct clockdomain *clkdm); | ||
149 | int (*clkdm_clk_enable)(struct clockdomain *clkdm); | ||
150 | int (*clkdm_clk_disable)(struct clockdomain *clkdm); | ||
151 | }; | ||
152 | |||
153 | void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps, | ||
154 | struct clkdm_ops *custom_funcs); | ||
120 | struct clockdomain *clkdm_lookup(const char *name); | 155 | struct clockdomain *clkdm_lookup(const char *name); |
121 | 156 | ||
122 | int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), | 157 | int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), |