diff options
author | Paul Walmsley <paul@pwsan.com> | 2011-09-14 16:01:20 -0600 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2011-09-14 16:01:20 -0600 |
commit | 08cb9703e2922db297d8f83ec110bde37823e021 (patch) | |
tree | c76df5dce71b7d8150e7c5c8a98073d5cf9542d2 /arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c | |
parent | 057673d8bd4a223c72850d843458cf3d35340bd3 (diff) | |
download | blackbird-op-linux-08cb9703e2922db297d8f83ec110bde37823e021.tar.gz blackbird-op-linux-08cb9703e2922db297d8f83ec110bde37823e021.zip |
OMAP: clockdomain: split clkdm_init()
In preparation for OMAP_CHIP() removal, split clkdm_init() into four
functions. This allows some of them to be called multiple times: for
example, clkdm_register_clkdms() can be called once to register
clockdomains that are common to a group of SoCs, and once to register
clockdomains that are specific to a single SoC.
The appropriate order to call these functions - which is enforced
by the code - is:
1. clkdm_register_platform_funcs()
2. clkdm_register_clkdms() (can be called multiple times)
3. clkdm_register_autodeps() (optional; deprecated)
4. clkdm_complete_init()
Convert the OMAP2, 3, and 4 clockdomain init code to use these new
functions.
While here, improve documentation, and increase CodingStyle
conformance by shortening some local variable names.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c')
-rw-r--r-- | arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c index 13bde95b6790..148a3e84162c 100644 --- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c @@ -857,12 +857,21 @@ static struct clockdomain *clockdomains_omap2[] __initdata = { NULL, }; +static void __init omap2_3_clockdomains_init(void) +{ + clkdm_register_clkdms(clockdomains_omap2); + clkdm_register_autodeps(clkdm_autodeps); + clkdm_complete_init(); +} + void __init omap2xxx_clockdomains_init(void) { - clkdm_init(clockdomains_omap2, clkdm_autodeps, &omap2_clkdm_operations); + clkdm_register_platform_funcs(&omap2_clkdm_operations); + omap2_3_clockdomains_init(); } void __init omap3xxx_clockdomains_init(void) { - clkdm_init(clockdomains_omap2, clkdm_autodeps, &omap3_clkdm_operations); + clkdm_register_platform_funcs(&omap3_clkdm_operations); + omap2_3_clockdomains_init(); } |