linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 4/5] OMAP24xx: CM: fix mask used for checking IDLEST status
Date: Thu, 27 May 2010 14:13:35 -0700	[thread overview]
Message-ID: <1274994816-30335-5-git-send-email-khilman@deeprootsystems.com> (raw)
In-Reply-To: <1274994816-30335-1-git-send-email-khilman@deeprootsystems.com>

On OMAP24xx, the polarity for the IDLEST bits is opposite of OMAP3.
The mask used to check this was using the bit position instead of the
bit mask.

This patch fixes the problem by using the bit mask instead of the bit
field.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/cm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
index 2d83565..721c3b6 100644
--- a/arch/arm/mach-omap2/cm.c
+++ b/arch/arm/mach-omap2/cm.c
@@ -50,15 +50,15 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
 
 	cm_idlest_reg = cm_idlest_offs[idlest_id - 1];
 
+	mask = 1 << idlest_shift;
+
 	if (cpu_is_omap24xx())
-		ena = idlest_shift;
+		ena = mask;
 	else if (cpu_is_omap34xx())
 		ena = 0;
 	else
 		BUG();
 
-	mask = 1 << idlest_shift;
-
 	/* XXX should be OMAP2 CM */
 	omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena),
 			  MAX_MODULE_READY_TIME, i);
-- 
1.7.0.2


  parent reply	other threads:[~2010-05-27 21:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 21:13 [PATCH 0/5] OMAP2/3: misc. hwmod fixes Kevin Hilman
2010-05-27 21:13 ` [PATCH 1/5] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE Kevin Hilman
2010-05-27 21:13 ` [PATCH 2/5] OMAP: hwmod: if IDLEST fields are not set, use module defaults Kevin Hilman
2010-06-18 16:43   ` Kevin Hilman
2010-05-27 21:13 ` [PATCH 3/5] OMAP: hwmod: add option for no locking in idle/enable paths Kevin Hilman
2010-05-27 21:13 ` Kevin Hilman [this message]
2010-05-27 21:13 ` [PATCH 5/5] OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST 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=1274994816-30335-5-git-send-email-khilman@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.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).