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.c | |
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.c')
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 58e42f76603f..f70b06ae8664 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -44,6 +44,7 @@ static LIST_HEAD(clkdm_list); | |||
44 | /* array of clockdomain deps to be added/removed when clkdm in hwsup mode */ | 44 | /* array of clockdomain deps to be added/removed when clkdm in hwsup mode */ |
45 | static struct clkdm_autodep *autodeps; | 45 | static struct clkdm_autodep *autodeps; |
46 | 46 | ||
47 | static struct clkdm_ops *arch_clkdm; | ||
47 | 48 | ||
48 | /* Private functions */ | 49 | /* Private functions */ |
49 | 50 | ||
@@ -292,6 +293,7 @@ static void _disable_hwsup(struct clockdomain *clkdm) | |||
292 | * clkdm_init - set up the clockdomain layer | 293 | * clkdm_init - set up the clockdomain layer |
293 | * @clkdms: optional pointer to an array of clockdomains to register | 294 | * @clkdms: optional pointer to an array of clockdomains to register |
294 | * @init_autodeps: optional pointer to an array of autodeps to register | 295 | * @init_autodeps: optional pointer to an array of autodeps to register |
296 | * @custom_funcs: func pointers for arch specfic implementations | ||
295 | * | 297 | * |
296 | * Set up internal state. If a pointer to an array of clockdomains | 298 | * Set up internal state. If a pointer to an array of clockdomains |
297 | * @clkdms was supplied, loop through the list of clockdomains, | 299 | * @clkdms was supplied, loop through the list of clockdomains, |
@@ -300,12 +302,18 @@ static void _disable_hwsup(struct clockdomain *clkdm) | |||
300 | * @init_autodeps was provided, register those. No return value. | 302 | * @init_autodeps was provided, register those. No return value. |
301 | */ | 303 | */ |
302 | void clkdm_init(struct clockdomain **clkdms, | 304 | void clkdm_init(struct clockdomain **clkdms, |
303 | struct clkdm_autodep *init_autodeps) | 305 | struct clkdm_autodep *init_autodeps, |
306 | struct clkdm_ops *custom_funcs) | ||
304 | { | 307 | { |
305 | struct clockdomain **c = NULL; | 308 | struct clockdomain **c = NULL; |
306 | struct clockdomain *clkdm; | 309 | struct clockdomain *clkdm; |
307 | struct clkdm_autodep *autodep = NULL; | 310 | struct clkdm_autodep *autodep = NULL; |
308 | 311 | ||
312 | if (!custom_funcs) | ||
313 | WARN(1, "No custom clkdm functions registered\n"); | ||
314 | else | ||
315 | arch_clkdm = custom_funcs; | ||
316 | |||
309 | if (clkdms) | 317 | if (clkdms) |
310 | for (c = clkdms; *c; c++) | 318 | for (c = clkdms; *c; c++) |
311 | _clkdm_register(*c); | 319 | _clkdm_register(*c); |