aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/io.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-02-23 00:09:32 -0500
committerPaul Walmsley <paul@pwsan.com>2010-02-24 14:29:45 -0500
commit7359154e94623f6a5a68a77b9fcfbef40633c93f (patch)
treecf76ba61a911c693c5e7f8b50c7a523e7c531788 /arch/arm/mach-omap2/io.c
parent50ebdac2ec9fb2de9c271cb2e0e13aae3b454166 (diff)
OMAP hwmod: convert header files with static allocations into C files
Code should be able to #include any header file without the fear that the header file will go allocating memory. This is a coding style issue, similar to commit 82e9bd588563c4e22ebb55b684ebec7e310cc715. Move the existing hwmod data from .h files to .c files. While here, convert "omap34xx" to "omap3xxx" in the hwmod files, since most of these structures should be reusable across all OMAP3 chips. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: BenoƮt Cousson <b-cousson@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/io.c')
-rw-r--r--arch/arm/mach-omap2/io.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index f1685572f982..303d5c2c6fb5 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -46,9 +46,6 @@
46#include <plat/clockdomain.h> 46#include <plat/clockdomain.h>
47#include "clockdomains.h" 47#include "clockdomains.h"
48#include <plat/omap_hwmod.h> 48#include <plat/omap_hwmod.h>
49#include "omap_hwmod_2420.h"
50#include "omap_hwmod_2430.h"
51#include "omap_hwmod_34xx.h"
52 49
53/* 50/*
54 * The machine specific code may provide the extra mapping besides the 51 * The machine specific code may provide the extra mapping besides the
@@ -322,21 +319,17 @@ static int __init _omap2_init_reprogram_sdrc(void)
322void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 319void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
323 struct omap_sdrc_params *sdrc_cs1) 320 struct omap_sdrc_params *sdrc_cs1)
324{ 321{
325 struct omap_hwmod **hwmods = NULL;
326
327 if (cpu_is_omap2420())
328 hwmods = omap2420_hwmods;
329 else if (cpu_is_omap2430())
330 hwmods = omap2430_hwmods;
331 else if (cpu_is_omap34xx())
332 hwmods = omap34xx_hwmods;
333
334 pwrdm_init(powerdomains_omap); 322 pwrdm_init(powerdomains_omap);
335 clkdm_init(clockdomains_omap, clkdm_autodeps); 323 clkdm_init(clockdomains_omap, clkdm_autodeps);
336#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ 324#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */
337 /* The OPP tables have to be registered before a clk init */ 325 if (cpu_is_omap242x())
338 omap_hwmod_init(hwmods); 326 omap2420_hwmod_init();
327 else if (cpu_is_omap243x())
328 omap2430_hwmod_init();
329 else if (cpu_is_omap34xx())
330 omap3xxx_hwmod_init();
339 omap2_mux_init(); 331 omap2_mux_init();
332 /* The OPP tables have to be registered before a clk init */
340 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); 333 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
341#endif 334#endif
342 335