From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Partha Basak <p-basak2@ti.com>, Rajendra Nayak <rnayak@ti.com>,
Benoit Cousson <b-cousson@ti.com>
Subject: [PATCH 2/3] OMAP4: PM: Declare idle modules as functional too
Date: Fri, 24 Sep 2010 10:40:14 -0600 [thread overview]
Message-ID: <20100924164012.19418.32263.stgit@twilight.localdomain> (raw)
In-Reply-To: <20100924163936.19418.47065.stgit@twilight.localdomain>
From: Rajendra Nayak <rnayak@ti.com>
The omap4_cm_wait_module_ready function would only check for
the modules to be completely functional before declaring them
ready to be accessed.
There might also be instances where in the module is actually
in idle (under h/w control) but should still be declared
accessible, as the h/w control would make it functional when
needed.
Hence make omap4_cm_wait_module_ready return true in case
the module is fully functional *or* in idle state.
Fail only if the module is fully disabled or stuck intransition.
The explaination from the TRM for the idlest bits on OMAP4 is as
below for quick reference
Module idle state:
0x0 func: Module is fully functional, including OCP
0x1 trans: Module is performing transition: wakeup, or sleep, or sleep
abortion
0x2 idle: Module is in Idle mode (only OCP part). It is functional if
using separate functional clock
0x3 disabled: Module is disabled and cannot be accessed
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/cm4xxx.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c
index b101091..f8a660a 100644
--- a/arch/arm/mach-omap2/cm4xxx.c
+++ b/arch/arm/mach-omap2/cm4xxx.c
@@ -43,7 +43,6 @@
* using separate functional clock
* 0x3 disabled: Module is disabled and cannot be accessed
*
- * TODO: Need to handle module accessible in idle state
*/
int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg)
{
@@ -52,9 +51,11 @@ int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg)
if (!clkctrl_reg)
return 0;
- omap_test_timeout(((__raw_readl(clkctrl_reg) &
- OMAP4430_IDLEST_MASK) == 0),
- MAX_MODULE_READY_TIME, i);
+ omap_test_timeout((
+ ((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) == 0) ||
+ (((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) >>
+ OMAP4430_IDLEST_SHIFT) == 0x2)),
+ MAX_MODULE_READY_TIME, i);
return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
}
next prev parent reply other threads:[~2010-09-24 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-24 16:40 [PATCH 0/3] OMAP: hwmod/device/CM: bug fixes for 2.6.37 Paul Walmsley
2010-09-24 16:40 ` [PATCH 1/3] OMAP: omap_device: Fix to support multiple hwmods for a single device Paul Walmsley
2010-09-24 16:40 ` Paul Walmsley [this message]
2010-09-24 16:40 ` [PATCH 3/3] OMAP: hwmod: Set autoidle after smartidle during _sysc_enable 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=20100924164012.19418.32263.stgit@twilight.localdomain \
--to=paul@pwsan.com \
--cc=b-cousson@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=p-basak2@ti.com \
--cc=rnayak@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