HACK: ARM: tegra: pinmux: drive strength just for DDC
authorJon Mayo <jmayo@nvidia.com>
Thu, 7 Apr 2011 22:40:45 +0000 (15:40 -0700)
committerErik Gilling <konkers@android.com>
Fri, 8 Apr 2011 00:21:56 +0000 (17:21 -0700)
When programming DDC pingroup, use 20 for the pull up drive strength
offset instead of 12 (offset for pull down drive strength.)

Change-Id: I7e5c2d8c998556513f8b16d6510d6596763bcc87
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Signed-off-by: Erik Gilling <konkers@android.com>
arch/arm/mach-tegra/pinmux.c

index f80d507671bc1b22921ab2821c8a2cde427f1b5f..3316c49db3cc95a57be9c2070530e9ce06a657be 100644 (file)
@@ -459,8 +459,22 @@ static int tegra_drive_pinmux_set_pull_up(enum tegra_drive_pingroup pg,
        spin_lock_irqsave(&mux_lock, flags);
 
        reg = pg_readl(drive_pingroups[pg].reg);
-       reg &= ~(0x1f << 12);
-       reg |= pull_up << 12;
+
+       /*
+        * 12 is the wrong offset for pull_up drive strength.  This is
+        * a hack for stingray to only use the correct offset for the
+        * DDC lines to avoid changing drive strengths across the board
+        * before cutting a release kernel.  This should be updated to
+        * use the correct offset on the release is cut.
+        */
+
+       if (pg == TEGRA_DRIVE_PINGROUP_DDC) {
+               reg &= ~(0x1f << 20);
+               reg |= pull_up << 20;
+       } else {
+               reg &= ~(0x1f << 12);
+               reg |= pull_up << 12;
+       }
        pg_writel(reg, drive_pingroups[pg].reg);
 
        spin_unlock_irqrestore(&mux_lock, flags);