arm: tegra: Clean up SOC conditionals
Scott Williams [Tue, 24 May 2011 05:08:42 +0000 (22:08 -0700)]
Change SOC conditionals to make them more forward-looking.

Original-Change-Id: Ib60db4e690c2f396afdec962616d735548b5a8a9
Reviewed-on: http://git-master/r/32706
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>

Rebase-Id: R4731d27b650940a5d532419616fefc495c621305

drivers/video/tegra/dc/hdmi.c
drivers/video/tegra/host/nvhost_3dctx.c
drivers/video/tegra/host/nvhost_acm.c

index 62401f8..ddd9c08 100644 (file)
@@ -208,7 +208,7 @@ struct tdms_config {
        u32 drive_current;
 };
 
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
 const struct tdms_config tdms_config[] = {
        { /* 480p modes */
        .pclk = 27000000,
index 62caea5..fc19de9 100644 (file)
 
 #define NV_WAR_789194 1
 
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
-static bool s_is_v1 = true;
-static int s_nr_gpus = 2;
-#else
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
 static bool s_is_v1 = false;
 static int s_nr_gpus = 1;
+#else
+static bool s_is_v1 = true;
+static int s_nr_gpus = 2;
 #endif
 
 const struct hwctx_reginfo ctxsave_regs_3d_global[] = {
index 0212780..46ce4a5 100644 (file)
@@ -107,13 +107,13 @@ static const char *get_module_clk_id(const char *module, int index)
                        return "emc";
        }
        if (strcmp(module, "gr3d") == 0) {
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
                if (index == 1)
-                       return "gr3d2";
-               if (index == 2)
                        return "emc";
 #else
                if (index == 1)
+                       return "gr3d2";
+               if (index == 2)
                        return "emc";
 #endif
        }