diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-06-10 17:53:30 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:46 -0800 |
commit | 26e563498fd86117d390844adb3d417ddd2af980 (patch) | |
tree | 49e9dc92d7e4eb45ae5d8c16455cfdb579e726ec /arch/arm/mach-tegra/pinmux-t3-tables.c | |
parent | c86c2259fec1d947f16ca3a65085d481f320c4bb (diff) |
ARM: tegra: Update Tegra3 pinmux with syscore
Rebase-Id: R00882a09ec05783d83aa4b94b23458fddff9e7aa
Diffstat (limited to 'arch/arm/mach-tegra/pinmux-t3-tables.c')
-rw-r--r-- | arch/arm/mach-tegra/pinmux-t3-tables.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/pinmux-t3-tables.c b/arch/arm/mach-tegra/pinmux-t3-tables.c index 30cf63d860b9..e607c6d94b0a 100644 --- a/arch/arm/mach-tegra/pinmux-t3-tables.c +++ b/arch/arm/mach-tegra/pinmux-t3-tables.c @@ -26,10 +26,10 @@ #include <linux/io.h> #include <linux/init.h> #include <linux/string.h> +#include <linux/syscore_ops.h> #include <mach/iomap.h> #include <mach/pinmux.h> -#include <mach/suspend.h> #define DRIVE_PINGROUP(pg_name, r) \ [TEGRA_DRIVE_PINGROUP_ ## pg_name] = { \ @@ -373,7 +373,7 @@ static inline void pg_writel(unsigned long value, unsigned long offset) writel(value, IO_TO_VIRT(TEGRA_APB_MISC_BASE + offset)); } -void tegra_pinmux_suspend(void) +static int tegra_pinmux_suspend(void) { unsigned int i; u32 *ctx = pinmux_reg; @@ -383,9 +383,11 @@ void tegra_pinmux_suspend(void) for (i = 0; i < ARRAY_SIZE(tegra_soc_drive_pingroups); i ++) *ctx++ = pg_readl(tegra_soc_drive_pingroups[i].reg); + + return 0; } -void tegra_pinmux_resume(void) +static void tegra_pinmux_resume(void) { unsigned int i; u32 *ctx = pinmux_reg; @@ -396,4 +398,14 @@ void tegra_pinmux_resume(void) for (i = 0; i < ARRAY_SIZE(tegra_soc_drive_pingroups); i ++) pg_writel(*ctx++, tegra_soc_drive_pingroups[i].reg); } + +static struct syscore_ops tegra_pinmux_syscore_ops = { + .suspend = tegra_pinmux_suspend, + .resume = tegra_pinmux_resume, +}; + +void tegra_init_pinmux(void) +{ + register_syscore_ops(&tegra_pinmux_syscore_ops); +} #endif |