diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-04-26 09:03:27 +0530 |
---|---|---|
committer | Henrik Aberg <henrik.aberg@stericsson.com> | 2011-05-18 09:40:10 +0200 |
commit | feefca746bb5bf320507331e2187968ab980ca7d (patch) | |
tree | 19e8c892cdcb10d4ddb6526dfed0b84b1bc66cbb | |
parent | 7f668cf0ba4e0ec9d2da6b1675e121d3ed927026 (diff) |
nmk-gpio: don't set SLPM to 1 for non-wakeup pins
Setting GPIOs' SLPM value to 1 (WAKEUP_DISABLE) is seen to cause increased
power consumption in sleep/deep-sleep. So remove the code which disables SLPM
based on the wakeup settings and only ensure it is on as needed.
ST-Ericsson Linux next: -
ST-Ericsson ID: ER327443
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ic15eca23a05b4b86cc6991dfefee4f398d478dfb
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17766
Reviewed-by: QATEST
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r-- | arch/arm/plat-nomadik/gpio.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index 14a6f3711c4..c716fa558bf 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c @@ -53,7 +53,6 @@ struct nmk_gpio_chip { u32 real_wake; u32 rwimsc; u32 fwimsc; - u32 slpm; u32 pull_up; }; @@ -568,11 +567,14 @@ static void __nmk_gpio_set_wake(struct nmk_gpio_chip *nmk_chip, int gpio, bool on) { #ifdef CONFIG_ARCH_U8500 - if (cpu_is_u8500v2()) { + /* + * Ensure WAKEUP_ENABLE is on. No need to disable it if wakeup is + * disabled, since setting SLPM to 1 increases power consumption, and + * wakeup is anyhow controlled by the RIMSC and FIMSC registers. + */ + if (cpu_is_u8500v2() && on) __nmk_gpio_set_slpm(nmk_chip, gpio - nmk_chip->chip.base, - on ? NMK_GPIO_SLPM_WAKEUP_ENABLE - : NMK_GPIO_SLPM_WAKEUP_DISABLE); - } + NMK_GPIO_SLPM_WAKEUP_ENABLE); #endif __nmk_gpio_irq_modify(nmk_chip, gpio, WAKE, on); } @@ -1039,13 +1041,6 @@ void nmk_gpio_wakeups_suspend(void) writel(chip->fwimsc & chip->real_wake, chip->addr + NMK_GPIO_FWIMSC); - if (cpu_is_u8500v2()) { - chip->slpm = readl(chip->addr + NMK_GPIO_SLPC); - - /* 0 -> wakeup enable */ - writel(~chip->real_wake, chip->addr + NMK_GPIO_SLPC); - } - clk_disable(chip->clk); } } @@ -1065,9 +1060,6 @@ void nmk_gpio_wakeups_resume(void) writel(chip->rwimsc, chip->addr + NMK_GPIO_RWIMSC); writel(chip->fwimsc, chip->addr + NMK_GPIO_FWIMSC); - if (cpu_is_u8500v2()) - writel(chip->slpm, chip->addr + NMK_GPIO_SLPC); - clk_disable(chip->clk); } } |