arm: tegra: disable smc91x eth device for dsim
Peng Du [Wed, 6 Mar 2013 20:12:19 +0000 (12:12 -0800)]
SMC91X is an ASIM-only device which DSIM doesn't support.

Change-Id: Icf40fed297c4fc3c9a51c88b8f304e2e54438c53
Signed-off-by: Peng Du <pdu@nvidia.com>
Reviewed-on: http://git-master/r/206772
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

arch/arm/mach-tegra/board-bonaire.c

index bb7553d..f10d60d 100644 (file)
@@ -468,12 +468,6 @@ static struct platform_device *bonaire_devices[] __initdata = {
 #if defined(CONFIG_MTD_NAND_TEGRA)
        &tegra_nand_device,
 #endif
-#if defined(CONFIG_TEGRA_SIMULATION_PLATFORM) && defined(CONFIG_SMC91X)
-       &tegra_sim_smc91x_device,
-#endif
-#if defined(CONFIG_SMSC911X)
-       &tegra_smsc911x_device,
-#endif
 };
 
 static int __init bonaire_touch_init(void)
@@ -644,6 +638,18 @@ static void __init tegra_bonaire_init(void)
 
        platform_add_devices(bonaire_devices, ARRAY_SIZE(bonaire_devices));
 
+#if defined(CONFIG_TEGRA_SIMULATION_PLATFORM) && defined(CONFIG_SMC91X)
+       if (!tegra_cpu_is_dsim()) { /* no ethernet card on DSIM */
+               platform_device_register(&tegra_sim_smc91x_device);
+       }
+#endif
+
+#if defined(CONFIG_SMSC911X)
+       if (!tegra_cpu_is_dsim()) { /* no ethernet card on DSIM */
+               platform_device_register(&tegra_smsc911x_device);
+       }
+#endif
+
 #ifdef CONFIG_TEGRA_SIMULATION_PLATFORM
        bonaire_power_off_init();
 #endif