linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vishwanath.bs@ti.com (Vishwanath BS)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHV2 REPOST 1/7] ARM: OMAP3 PM: correct enable/disable of daisy io chain
Date: Wed, 14 Dec 2011 21:31:11 +0530	[thread overview]
Message-ID: <1323878477-21122-2-git-send-email-vishwanath.bs@ti.com> (raw)
In-Reply-To: <1323878477-21122-1-git-send-email-vishwanath.bs@ti.com>

From: Mohan V <mohanv@ti.com>

Currently the enabling and disabling of IO Daisy chain is not
according to the TRM. The below steps are followed to enable/
disable the IO chain according to the "Sec 3.5.7.2.2
I/O Wake-Up Mechanism" in OMAP3630 Public TRM[1].

Steps to enable IO chain:
[a] Set PM_WKEN_WKUP.EN_IO bit
[b] Set the PM_WKEN_WKUP.EN_IO_CHAIN bit
[c] Poll for PM_WKST_WKUP.ST_IO_CHAIN.
[d] When ST_IO_CHAIN bit set to 1, clear PM_WKEN_WKUP.EN_IO_CHAIN
[e] Clear ST_IO_CHAIN bit.

Steps to disable IO chain:
[a] Clear PM_WKEN_WKUP.EN_IO_CHAIN bit
[b] Clear PM_WKEN_WKUP.EN_IO bit
[c] Clear PM_WKST_WKUP.ST_IO bit by writing 1 to it.

Step [e] & [c] in each case can be skipped, as these are handled
by the PRCM interrupt handler later.

[1] http://focus.ti.com/pdfs/wtbu/OMAP36xx_ES1.x_PUBLIC_TRM_vV.zip

Signed-off-by: Mohan V <mohanv@ti.com>
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.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 3b9edc8..074688b 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -105,16 +105,17 @@ static void omap3_enable_io_chain(void)
 	/* Do a readback to assure write has been done */
 	omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
 
-	while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
+	while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) &
 		 OMAP3430_ST_IO_CHAIN_MASK)) {
 		timeout++;
 		if (timeout > 1000) {
 			pr_err("Wake up daisy chain activation failed.\n");
 			return;
 		}
-		omap2_prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
-					   WKUP_MOD, PM_WKEN);
 	}
+	omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
+			PM_WKEN);
+
 }
 
 static void omap3_disable_io_chain(void)
-- 
1.7.0.4

  reply	other threads:[~2011-12-14 16:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 16:01 [PATCHV2 REPOST 0/7] ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
2011-12-14 16:01 ` Vishwanath BS [this message]
2011-12-14 16:01 ` [PATCHV2 REPOST 2/7] ARM: OMAP3 PM: Move IO Daisychain function to omap3 prm file Vishwanath BS
2012-01-10 17:33   ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 3/7] ARM: OMAP4 PM: Add IO Daisychain support Vishwanath BS
2012-01-10 17:35   ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 4/7] ARM: OMAP3 PM: Enable IO Wake up Vishwanath BS
2012-01-10 17:36   ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 5/7] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Vishwanath BS
2012-01-10 17:46   ` Kevin Hilman
2012-01-10 17:47     ` Kevin Hilman
2012-01-10 17:56   ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 6/7] ARM: OMAP3 PM: Remove IO Daisychain control from cpuidle Vishwanath BS
2012-01-10 17:56   ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 7/7] ARM: OMAP3 PM: Enable IO Daisychain for supported chips Vishwanath BS
2012-01-10 17:26 ` [PATCHV2 REPOST 0/7] ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Kevin Hilman

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=1323878477-21122-2-git-send-email-vishwanath.bs@ti.com \
    --to=vishwanath.bs@ti.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).