From: Jon Mayo Date: Thu, 7 Apr 2011 22:40:45 +0000 (-0700) Subject: HACK: ARM: tegra: pinmux: drive strength just for DDC X-Git-Tag: firefly_0821_release~9834^2~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=abcdca12e9273c0f3752ba7ca378b1ecb818f280;p=firefly-linux-kernel-4.4.55.git HACK: ARM: tegra: pinmux: drive strength just for DDC 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 Signed-off-by: Erik Gilling --- diff --git a/arch/arm/mach-tegra/pinmux.c b/arch/arm/mach-tegra/pinmux.c index f80d507671bc..3316c49db3cc 100644 --- a/arch/arm/mach-tegra/pinmux.c +++ b/arch/arm/mach-tegra/pinmux.c @@ -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);