diff options
author | ramesh.chandrasekaran <ramesh.chandrasekaran@stericsson.com> | 2012-05-23 14:14:00 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-25 08:35:17 +0200 |
commit | cd092ef3940cbf2c6267b53f00c2fb322458c846 (patch) | |
tree | 4c16e1e4ce7b921e72e4fb532dd9dae7e59f5aca /arch/arm/mach-ux500/pm/context.c | |
parent | 7f212ad0c3444a11428a66a88db92cc9f5229b79 (diff) |
pm: Fix for Ethernet doesn't work after suspend
Signed-off-by: ramesh.chandrasekaran <ramesh.chandrasekaran@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/pm/context.c')
-rw-r--r-- | arch/arm/mach-ux500/pm/context.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/pm/context.c b/arch/arm/mach-ux500/pm/context.c index 01040b6202f..9dbbc9a7fdd 100644 --- a/arch/arm/mach-ux500/pm/context.c +++ b/arch/arm/mach-ux500/pm/context.c @@ -193,6 +193,8 @@ static u32 gpio_bankaddr[GPIO_NUM_BANKS] = {IO_ADDRESS(U8500_GPIOBANK0_BASE), static u32 gpio_save[GPIO_NUM_BANKS][GPIO_NUM_SAVE_REGISTERS]; +void __iomem *fsmc_base_addr; +static u32 fsmc_bcr0; /* * Stacks and stack pointers */ @@ -634,6 +636,26 @@ void context_vape_restore(void) } /* + * Save FSMC registers that will be reset + * during power save. + */ +void context_fsmc_save(void) +{ + fsmc_base_addr = ioremap_nocache(U8500_FSMC_BASE, 8); + fsmc_bcr0 = readl(fsmc_base_addr); +} + +/* + * Restore FSMC registers that will be reset + * during power save. + */ +void context_fsmc_restore(void) +{ + writel(fsmc_bcr0, fsmc_base_addr); + iounmap(fsmc_base_addr); +} + +/* * Save GPIO registers that might be modified * for power save reasons. */ @@ -650,6 +672,7 @@ void context_gpio_save(void) gpio_save[i][4] = readl(gpio_bankaddr[i] + NMK_GPIO_DAT); gpio_save[i][6] = readl(gpio_bankaddr[i] + NMK_GPIO_SLPC); } + /* Mask GPIO140 and GPIO32 which gives * spurious interrupts during sleep */ |