omap2/3: Fix initcalls for multi-omap
authorTony Lindgren <tony@atomide.com>
Fri, 12 Feb 2010 20:26:48 +0000 (12:26 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 15 Feb 2010 17:27:05 +0000 (09:27 -0800)
Otherwise the wrong initcalls can run.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/emu.c

index 935e36c3a5e944748dc295f4f7816afb5aaedf68..c104d5ca65b2543383f081b90dd851941bad9761 100644 (file)
@@ -510,7 +510,12 @@ static struct platform_device dummy_pdev = {
  **/
 static void __init omap_hsmmc_reset(void)
 {
-       u32 i, nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC :
+       u32 i, nr_controllers;
+
+       if (cpu_is_omap242x())
+               return;
+
+       nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC :
                (cpu_is_omap34xx() ? OMAP34XX_NR_MMC : OMAP24XX_NR_MMC);
 
        for (i = 0; i < nr_controllers; i++) {
index ec0d984a26fcc5fa185ee64b3360511bb91f444a..9c442e290ccbf9523a03f6d00d22b6dd1ab51243 100644 (file)
@@ -56,6 +56,9 @@ static struct amba_device omap3_etm_device = {
 
 static int __init emu_init(void)
 {
+       if (!cpu_is_omap34xx())
+               return -ENODEV;
+
        amba_device_register(&omap3_etb_device, &iomem_resource);
        amba_device_register(&omap3_etm_device, &iomem_resource);