summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/pm
diff options
context:
space:
mode:
authorRickard Andersson <rickard.andersson@stericsson.com>2011-05-02 16:18:19 +0200
committerHenrik Aberg <henrik.aberg@stericsson.com>2011-05-18 09:40:15 +0200
commit95769f26527700c1eb1564018db575e7db461d2c (patch)
tree8e6ee0e0ca00b392659c5d5517546d2a44e0ca87 /arch/arm/mach-ux500/pm
parente4536e1494836274547f6d28d8497f1a9e84ce60 (diff)
arm: ux500: Configure modem STM pins correctly in sleep
Modem STM pins was not correctly configured for the sleep states ApSleep and ApDeepSleep. This is now fixed both for suspend and cpuidle. ST Ericsson ID: 323509 ST Ericsson FOSS-OUT ID: trivial ST Ericsson Linux next: - Change-Id: I48e8bd3f00e2a6320d8d41a61acee271d4c81d91 Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/22434 Reviewed-by: QATEST Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/pm')
-rw-r--r--arch/arm/mach-ux500/pm/context.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/pm/context.c b/arch/arm/mach-ux500/pm/context.c
index 89747b5a576..7ff2c5bf2ff 100644
--- a/arch/arm/mach-ux500/pm/context.c
+++ b/arch/arm/mach-ux500/pm/context.c
@@ -670,13 +670,15 @@ void context_gpio_restore_mux(void)
/*
* Safe sequence used to switch IOs between GPIO and Alternate-C mode:
- * - Save SLPM registers
- * - Set SLPM=0 for the IOs you want to switch and others to 1
+ * - Save SLPM registers (Not done.)
+ * - Set SLPM=0 for the IOs you want to switch. (We assume that all
+ * SLPM registers already are 0 except for the ones that wants to
+ * have the mux connected in sleep (e.g modem STM)).
* - Configure the GPIO registers for the IOs that are being switched
* - Set IOFORCE=1
* - Modify the AFLSA/B registers for the IOs that are being switched
* - Set IOFORCE=0
- * - Restore SLPM registers
+ * - Restore SLPM registers (Not done.)
* - Any spurious wake up event during switch sequence to be ignored
* and cleared
*/
@@ -691,14 +693,12 @@ void context_gpio_mux_safe_switch(bool begin)
if (begin) {
for (i = 0; i < GPIO_NUM_BANKS; i++) {
/* Save registers */
- slpc[i] = readl(gpio_bankaddr[i] + NMK_GPIO_SLPC);
rwimsc[i] = readl(gpio_bankaddr[i] + NMK_GPIO_RWIMSC);
fwimsc[i] = readl(gpio_bankaddr[i] + NMK_GPIO_FWIMSC);
/* Prevent spurious wakeups */
writel(0, gpio_bankaddr[i] + NMK_GPIO_RWIMSC);
writel(0, gpio_bankaddr[i] + NMK_GPIO_FWIMSC);
- writel(0, gpio_bankaddr[i] + NMK_GPIO_SLPC);
}
ux500_pm_prcmu_set_ioforce(true);
@@ -707,7 +707,6 @@ void context_gpio_mux_safe_switch(bool begin)
/* Restore wake up settings */
for (i = 0; i < GPIO_NUM_BANKS; i++) {
- writel(slpc[i], gpio_bankaddr[i] + NMK_GPIO_SLPC);
writel(rwimsc[i], gpio_bankaddr[i] + NMK_GPIO_RWIMSC);
writel(fwimsc[i], gpio_bankaddr[i] + NMK_GPIO_FWIMSC);
}