diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-03-10 12:16:31 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-11 18:55:43 -0500 |
commit | aa4b1f6e83aaf20997edc4c10e03baf834343e5a (patch) | |
tree | 55fd98afbd265d7850d8f4c408415abf25fa97d7 /arch/arm | |
parent | 54c44fb7df4774280a2deb4ba191cbab84602413 (diff) |
OMAP4: fix temporary hacks that break multi-omap PM
When building for multi-omap, and OMAP4 is enabled, CONFIG_ARCH_OMAP4
will be true and prevent included code from building/running for
OMAP2/3 as well.
This problem exists in io.c where some hwmod/PM/SDRC init code is
prevented from running even on OMAP2/3 when OMAP4 is included in a
multi-OMAP build.
A quick glance suggests that this #ifndef is no longer needed in most
of the cases. In the remaining cases, the function is wrapped with
"if (cpu_is_omap24xx() || cpu_is_omap34xx())" which will be optimized
out for OMAP4-only builds.
Note that this is only a short-term fix. Longer-term, OMAP4
needs to create init functions for SDRC and hwmod late-init.
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/io.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index ae89d55132d..87f676acf61 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -309,7 +309,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
309 | { | 309 | { |
310 | pwrdm_init(powerdomains_omap); | 310 | pwrdm_init(powerdomains_omap); |
311 | clkdm_init(clockdomains_omap, clkdm_autodeps); | 311 | clkdm_init(clockdomains_omap, clkdm_autodeps); |
312 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ | ||
313 | if (cpu_is_omap242x()) | 312 | if (cpu_is_omap242x()) |
314 | omap2420_hwmod_init(); | 313 | omap2420_hwmod_init(); |
315 | else if (cpu_is_omap243x()) | 314 | else if (cpu_is_omap243x()) |
@@ -319,7 +318,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
319 | omap2_mux_init(); | 318 | omap2_mux_init(); |
320 | /* The OPP tables have to be registered before a clk init */ | 319 | /* The OPP tables have to be registered before a clk init */ |
321 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); | 320 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); |
322 | #endif | ||
323 | 321 | ||
324 | if (cpu_is_omap2420()) | 322 | if (cpu_is_omap2420()) |
325 | omap2420_clk_init(); | 323 | omap2420_clk_init(); |
@@ -333,11 +331,12 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
333 | pr_err("Could not init clock framework - unknown CPU\n"); | 331 | pr_err("Could not init clock framework - unknown CPU\n"); |
334 | 332 | ||
335 | omap_serial_early_init(); | 333 | omap_serial_early_init(); |
336 | #ifndef CONFIG_ARCH_OMAP4 | 334 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */ |
337 | omap_hwmod_late_init(); | 335 | omap_hwmod_late_init(); |
338 | omap_pm_if_init(); | 336 | omap_pm_if_init(); |
339 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); | 337 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { |
340 | _omap2_init_reprogram_sdrc(); | 338 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); |
341 | #endif | 339 | _omap2_init_reprogram_sdrc(); |
340 | } | ||
342 | gpmc_init(); | 341 | gpmc_init(); |
343 | } | 342 | } |