All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benoit Cousson <b-cousson@ti.com>
To: linux-omap@vger.kernel.org
Cc: Benoit Cousson <b-cousson@ti.com>, Paul Walmsley <paul@pwsan.com>
Subject: [PATCH 02/10] OMAP: CM: Move MAX_MODULE_READY_TIME to cm.h
Date: Fri,  7 May 2010 17:44:07 +0200	[thread overview]
Message-ID: <1273247055-15165-3-git-send-email-b-cousson@ti.com> (raw)
In-Reply-To: <1273247055-15165-1-git-send-email-b-cousson@ti.com>

The maximum timeout to wait for the PRCM to request that a module
exit idle or reach functionnal state is common to OMAP2/3/4 SoCs,
so, move it to the chip family-common cm.h include file.

Reduce the timeout from 20 ms to 2 ms.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/cm.c     |    3 ---
 arch/arm/mach-omap2/cm.h     |    9 +++++++++
 arch/arm/mach-omap2/cm4xxx.c |   18 +-----------------
 3 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
index 58e4a1c..2d83565 100644
--- a/arch/arm/mach-omap2/cm.c
+++ b/arch/arm/mach-omap2/cm.c
@@ -27,9 +27,6 @@
 #include "cm-regbits-24xx.h"
 #include "cm-regbits-34xx.h"
 
-/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
-#define MAX_MODULE_READY_TIME		20000
-
 static const u8 cm_idlest_offs[] = {
 	CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3
 };
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
index 94728b1..cd34036 100644
--- a/arch/arm/mach-omap2/cm.h
+++ b/arch/arm/mach-omap2/cm.h
@@ -143,4 +143,13 @@ static inline u32 cm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx)
 #define OMAP24XX_CM_IDLEST_VAL		0
 #define OMAP34XX_CM_IDLEST_VAL		1
 
+/*
+ * MAX_MODULE_READY_TIME: max duration in microseconds to wait for the
+ * PRCM to request that a module exit the inactive state in the case of
+ * OMAP2 & 3.
+ * In the case of OMAP4 this is the max duration in microseconds for the
+ * module to reach the functionnal state from an inactive state.
+ */
+#define MAX_MODULE_READY_TIME		2000
+
 #endif
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c
index 4af76bb..af32a45 100644
--- a/arch/arm/mach-omap2/cm4xxx.c
+++ b/arch/arm/mach-omap2/cm4xxx.c
@@ -22,23 +22,7 @@
 #include <asm/atomic.h>
 
 #include "cm.h"
-
-/* XXX move this to cm.h */
-/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
-#define MAX_MODULE_READY_TIME			20000
-
-/*
- * OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK: isolates the IDLEST field in the
- * CM_CLKCTRL register.
- */
-#define OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK	(0x2 << 16)
-
-/*
- * OMAP4 prcm_mod u32 fields contain packed data: the CM ID in bit 16 and
- * the PRCM module offset address (from the CM module base) in bits 15-0.
- */
-#define OMAP4_PRCM_MOD_CM_ID_SHIFT		16
-#define OMAP4_PRCM_MOD_OFFS_MASK		0xffff
+#include "cm-regbits-44xx.h"
 
 /**
  * omap4_cm_wait_idlest_ready - wait for a module to leave idle or standby
-- 
1.6.1.3


  parent reply	other threads:[~2010-05-07 15:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 15:44 [PATCH 00/10] OMAP: HWMOD fixes and cleanup Benoit Cousson
2010-05-07 15:44 ` [PATCH 01/10] OMAP4: hwmod: Replace module & device offsets by absolute clkctrl address Benoit Cousson
2010-05-07 15:44 ` Benoit Cousson [this message]
2010-05-07 15:44 ` [PATCH 03/10] OMAP4: hwmod & CM: Implement the omap4_cm_wait_module_ready function Benoit Cousson
2010-05-07 15:44 ` [PATCH 04/10] OMAP4: hwmod: Replace OCPIF_HAS_IDLEST by HWMOD_NO_IDLEST Benoit Cousson
2010-05-26 21:34   ` Kevin Hilman
2010-05-07 15:44 ` [PATCH 05/10] OMAP: hwmod: Fix wrong pointer iteration in oh->slaves Benoit Cousson
2010-05-07 15:44 ` [PATCH 06/10] OMAP: hwmod: Remove IS_ERR check with omap_clk_get_by_name return value Benoit Cousson
2010-05-07 15:44 ` [PATCH 07/10] OMAP: hwmod: Replace WARN by pr_warning if clock lookup failed Benoit Cousson
2010-05-07 15:44 ` [PATCH 08/10] OMAP: hwmod: Do not exit the iteration if one clock init failed Benoit Cousson
2010-05-07 15:44 ` [PATCH 09/10] OMAP: hwmod: Rename hwmod name for the MPU Benoit Cousson
2010-05-07 15:44 ` [PATCH 10/10] OMAP: hwmod: Replace WARN by pr_warning for clockdomain check Benoit Cousson
2010-05-18 18:24 ` [PATCH 00/10] OMAP: HWMOD fixes and cleanup Paul Walmsley

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=1273247055-15165-3-git-send-email-b-cousson@ti.com \
    --to=b-cousson@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.