public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org
Cc: gadiyar@ti.com, k.kooi@student.utwente.nl,
	dirk.behme@googlemail.com, igor.stoppa@nokia.com,
	r-woodruff2@ti.com, jouni.hogander@nokia.com
Subject: [PATCH 4/4] OMAP2 clock: check register address in omap2_clk_wait_ready()
Date: Thu, 26 Jun 2008 01:09:21 -0600	[thread overview]
Message-ID: <20080626070915.16555.41229.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080626070305.16555.96759.stgit@localhost.localdomain>

The test in omap2_clk_wait_ready() for DSS or CAM clocks didn't
verify that the PRCM {F,I}CLKEN1 register was in the CORE powerdomain.
Add this check in.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---

 arch/arm/mach-omap2/clock.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 59b042f..577be44 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -236,13 +236,17 @@ static void omap2_clk_wait_ready(struct clk *clk)
 	else
 		return;
 
-	/* No check for DSS or CAM clocks on 24xx */
-	/* REVISIT: This should check prcm_mod against CORE_MOD */
-	if (cpu_is_omap24xx() && (reg & 0x0f) == 0) { /* CM_{F,I}CLKEN1 */
+	/* 24xx: DSS and CAM have no idlest bits for their target agents */
+	if (cpu_is_omap24xx() &&
+	    (prcm_mod == OMAP2420_CM_REGADDR(CORE_MOD, 0) ||
+	     prcm_mod == OMAP2430_CM_REGADDR(CORE_MOD, 0)) &&
+	    (reg & 0x0f) == 0) { /* CM_{F,I}CLKEN1 */
+
 		if (clk->enable_bit == OMAP24XX_EN_DSS2_SHIFT ||
 		    clk->enable_bit == OMAP24XX_EN_DSS1_SHIFT ||
 		    clk->enable_bit == OMAP24XX_EN_CAM_SHIFT)
 			return;
+
 	}
 
 	/* REVISIT: What are the appropriate exclusions for 34XX? */



  parent reply	other threads:[~2008-06-26  7:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26  7:11 [PATCH 0/4] OMAP2/3 clock: fix some bugs in omap2_clk_wait_ready() Paul Walmsley
2008-06-26  7:09 ` [PATCH 1/4] OMAP2/3 clock: clean up omap2_clk_wait_ready() Paul Walmsley
2008-06-26  7:09 ` [PATCH 2/4] OMAP3 clock: fix omap2_clk_wait_ready() for OMAP3430ES2+ DSS Paul Walmsley
2008-06-26  7:09 ` [PATCH 3/4] OMAP3 clock: OMAP3430ES2+ has SSI target idlest bit Paul Walmsley
2008-06-26  7:09 ` Paul Walmsley [this message]
2008-06-26 10:33 ` [PATCH 0/4] OMAP2/3 clock: fix some bugs in omap2_clk_wait_ready() Pandita, Vikram
2008-06-26 17:13   ` Paul Walmsley
2008-06-26 19:11     ` Felipe Balbi
2008-06-27  5:29   ` Paul Walmsley
2008-07-17  1:33   ` Paul Walmsley
2008-06-26 13:44 ` 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=20080626070915.16555.41229.stgit@localhost.localdomain \
    --to=paul@pwsan.com \
    --cc=dirk.behme@googlemail.com \
    --cc=gadiyar@ti.com \
    --cc=igor.stoppa@nokia.com \
    --cc=jouni.hogander@nokia.com \
    --cc=k.kooi@student.utwente.nl \
    --cc=linux-omap@vger.kernel.org \
    --cc=r-woodruff2@ti.com \
    /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