linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/10] omap3: PM: enable UART3 module wakeups
Date: Thu, 22 Oct 2009 15:12:51 -0700	[thread overview]
Message-ID: <20091022221250.27408.35730.stgit@localhost> (raw)
In-Reply-To: <20091022221013.27408.443.stgit@localhost>

From: Kevin Hilman <khilman@deeprootsystems.com>

UART3 is in the PER powerdomain.  If PER goes idle/inactive
independently of CORE, for UART3 to wakeup it must have its wakeup
enable bits setup in PM_WKEN_PER.  This patch enables these bits.

The reason it works when PER and CORE work together is because when
CORE goes inactive/retention, the IOPAD wakeups are enabled and
trigger UART3 wakeup.

Without this patch, when the UART inactivity timer fires for UART3,
its clocks are disabled and it's unable to wakeup so will be unusable
until PER is awoken by another source.

Another way of testing is by keeping CORE on during suspend but
allowing PER to hit retention

  # echo 3 > /debug/pm_debug/core_pwrdm/suspend

then enter suspend

  # echo mem > /sys/power/state

Without this patch, UART3 will be unable to wakeup the system.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/pm34xx.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 378c2f6..8946319 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -639,14 +639,15 @@ static void __init prcm_setup_regs(void)
 	prm_write_mod_reg(OMAP3430_IO_EN | OMAP3430_WKUP_EN,
 			  OCP_MOD, OMAP3_PRM_IRQENABLE_MPU_OFFSET);
 
-	/* Enable GPIO wakeups in PER */
+	/* Enable wakeups in PER */
 	prm_write_mod_reg(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 |
-			  OMAP3430_EN_GPIO6, OMAP3430_PER_MOD, PM_WKEN);
+			  OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3,
+			  OMAP3430_PER_MOD, PM_WKEN);
 	/* and allow them to wake up MPU */
 	prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_GRPSEL_GPIO4 | OMAP3430_EN_GPIO5 |
-			  OMAP3430_GRPSEL_GPIO6,
+			  OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3,
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */

  parent reply	other threads:[~2009-10-22 22:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 22:11 [PATCH 00/10] omap fixes for v2.6.32-rc5 Tony Lindgren
2009-10-22 22:11 ` [PATCH 01/10] omap: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad Tony Lindgren
2009-10-22 22:11 ` [PATCH 02/10] omap: SDMA: Fix omap_stop_dma() API for channel linking Tony Lindgren
2009-10-22 22:11 ` [PATCH 03/10] omap: iommu: fix wrong condition check for SUPERSECTION Tony Lindgren
2009-10-22 22:12 ` [PATCH 04/10] omap1: Fix redundant UARTs pin muxing that can break other hardware support Tony Lindgren
2009-10-22 22:12 ` [PATCH 05/10] omap1: Fix DSP public peripherals support for ams-delta Tony Lindgren
2009-10-22 23:22   ` Jon Hunter
2009-10-23 19:19     ` Tony Lindgren
2009-10-23 23:11       ` Janusz Krzysztofik
2009-10-22 22:12 ` [PATCH 06/10] omap: Fix detection of n8x0 Tony Lindgren
2009-10-22 22:12 ` [PATCH 07/10] omap2: Fix console serial port number for n8x0 Tony Lindgren
2009-10-22 22:12 ` Tony Lindgren [this message]
2009-10-22 22:13 ` [PATCH 09/10] omap4: Allow omap_serial_early_init() for OMAP4430 board Tony Lindgren
2009-10-22 22:13 ` [PATCH 10/10] omap4: Fix UART4 platform data on omap4 Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091022221250.27408.35730.stgit@localhost \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).