diff options
author | Venkata (Muni) Anda <vanda@nvidia.com> | 2010-08-18 16:16:24 -0700 |
---|---|---|
committer | Yu-Huan Hsu <yhsu@nvidia.com> | 2010-08-19 22:52:21 -0700 |
commit | 3778dfbe08f463847daafb5fd701e6364e7ff599 (patch) | |
tree | 349687ef4995357bbf7af6a852552109d5f74df0 | |
parent | 7cbbbf6ebdff77af92b710e7e784284c75899285 (diff) |
tegra: Save restore pad control registers acorss LP0
Pad control register should be saved before LP0
and restored after LP0.
(cherry picked from commit df7e8107f49e15d5652b63b5a3d35121b9f722ad)
Change-Id: I8679de6bccf6292a41a79b5603a9f02da41f8b15
Reviewed-on: http://git-master.nvidia.com/r/5333
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/pinmux-t2-tables.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pinmux-t2-tables.c b/arch/arm/mach-tegra/pinmux-t2-tables.c index 5d9f65bacdbc..d1b54662689a 100644 --- a/arch/arm/mach-tegra/pinmux-t2-tables.c +++ b/arch/arm/mach-tegra/pinmux-t2-tables.c @@ -967,9 +967,11 @@ const struct tegra_pingroup_desc* tegra_pinmux_get_pingroups(void) { #define PIN_MUX_CTL_REG_NUM 8 #define PULLUPDOWN_REG_A 0xa0 #define PULLUPDOWN_REG_NUM 5 +#define PADCTRL_REG 0x868 +#define PADCTRL_REG_NUM 42 static u32 pinmux_reg[TRISTATE_REG_NUM + PIN_MUX_CTL_REG_NUM + - PULLUPDOWN_REG_NUM]; + PULLUPDOWN_REG_NUM + PADCTRL_REG_NUM]; static inline unsigned long pg_readl(unsigned long offset) { @@ -994,6 +996,9 @@ void tegra_pinmux_suspend(void) for (i=0; i<TRISTATE_REG_NUM; i++) *ctx++ = pg_readl(TRISTATE_REG_A + i*4); + + for (i=0; i<PADCTRL_REG_NUM; i++) + *ctx++ = pg_readl(PADCTRL_REG + i*4); } void tegra_pinmux_resume(void) @@ -1009,5 +1014,13 @@ void tegra_pinmux_resume(void) for (i=0; i<TRISTATE_REG_NUM; i++) pg_writel(*ctx++, TRISTATE_REG_A + i*4); + + for (i=PADCTRL_REG; i< PADCTRL_REG + 4 * PADCTRL_REG_NUM; i+=4, ctx++) { + /* Skip DRAM pads */ + if (i == 0x8c8 || i == 0x8cc || i == 0x8d0 || i == 0x8d4 || + i == 0x8d8 || i == 0x8e4 || i == 0x8e8) + continue; + pg_writel(*ctx, i); + } } #endif |