From: Tony Lindgren Date: Fri, 12 Feb 2010 20:26:48 +0000 (-0800) Subject: omap2/3: Fix initcalls for multi-omap X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4323e9f71903f654abc6d21a3ef81c08e0ac2288;p=mv-sheeva.git omap2/3: Fix initcalls for multi-omap Otherwise the wrong initcalls can run. Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 935e36c3a5e..c104d5ca65b 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -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++) { diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c index ec0d984a26f..9c442e290cc 100644 --- a/arch/arm/mach-omap2/emu.c +++ b/arch/arm/mach-omap2/emu.c @@ -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);