From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Hilman, Kevin" <khilman@ti.com>
Cc: "paul@pwsan.com" <paul@pwsan.com>,
"Nayak, Rajendra" <rnayak@ti.com>,
"Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"toddpoynor@google.com" <toddpoynor@google.com>
Subject: Re: [PATCH v3 8/8] OMAP2+: hwmod: Follow the recommended PRCM module enable sequence
Date: Tue, 28 Jun 2011 23:33:46 +0200 [thread overview]
Message-ID: <4E0A48BA.7080602@ti.com> (raw)
In-Reply-To: <87wrg5yiz5.fsf@ti.com>
On 6/28/2011 7:16 PM, Hilman, Kevin wrote:
> Benoit Cousson<b-cousson@ti.com> writes:
>
>> From: Rajendra Nayak<rnayak@ti.com>
>>
>> On OMAP4, the PRCM recommended sequence for enabling
>> a module after power-on-reset is:
>> -1- Force clkdm to SW_WKUP
>> -2- Enabling the clocks
>> -3- Configure desired module mode to "enable" or "auto"
>> -4- Wait for the desired module idle status to be FUNC
>> -5- Program clkdm in HW_AUTO(if supported)
>>
>> This sequence applies to all older OMAPs' as well,
>> however since they use autodeps, it makes sure that
>> no clkdm is in IDLE, and hence not requiring a force
>> SW_WKUP when a module is being enabled.
>
> OK, I found the problem that prevents booting on OMAP3...
Cool... thanks for that.
>> OMAP4 does not need to support autodeps, because
>> of the dyanamic dependency feature, wherein
>> the HW takes care of waking up a clockdomain from
>> idle and hence the module, whenever an interconnect
>> access happens to the given module.
>>
>> Implementing the sequence for OMAP4 requires
>> the clockdomain handling that is currently done in
>> clock framework to be done as part of hwmod framework
>> since the step -4- above to "Wait for the desired
>> module idle status to be FUNC" is done as part of
>> hwmod framework.
>>
>> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
>> [b-cousson@ti.com: Adapt it to the new clkdm hwmod attribute and API]
>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>> Cc: Paul Walmsley<paul@pwsan.com>
>> ---
>> arch/arm/mach-omap2/clock.c | 17 +----------------
>> arch/arm/mach-omap2/omap_hwmod.c | 26 +++++++++++++++++++++++++-
>> 2 files changed, 26 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
>> index 180299e..2828d29 100644
>> --- a/arch/arm/mach-omap2/clock.c
>> +++ b/arch/arm/mach-omap2/clock.c
>> @@ -268,9 +268,6 @@ void omap2_clk_disable(struct clk *clk)
>> clk->ops->disable(clk);
>> }
>>
>> - if (clk->clkdm)
>> - clkdm_clk_disable(clk->clkdm, clk);
>> -
>> if (clk->parent)
>> omap2_clk_disable(clk->parent);
>> }
>> @@ -308,30 +305,18 @@ int omap2_clk_enable(struct clk *clk)
>> }
>> }
>>
>> - if (clk->clkdm) {
>> - ret = clkdm_clk_enable(clk->clkdm, clk);
>> - if (ret) {
>> - WARN(1, "clock: %s: could not enable clockdomain %s: "
>> - "%d\n", clk->name, clk->clkdm->name, ret);
>> - goto oce_err2;
>> - }
>> - }
>> -
>> if (clk->ops&& clk->ops->enable) {
>> trace_clock_enable(clk->name, 1, smp_processor_id());
>> ret = clk->ops->enable(clk);
>> if (ret) {
>> WARN(1, "clock: %s: could not enable: %d\n",
>> clk->name, ret);
>> - goto oce_err3;
>> + goto oce_err2;
>> }
>> }
>
> The clkdm enable/disable in this part of the patch is still required on
> OMAP2/3, since the clkdm is still attached to the clock and not to the
> hwmod.
OK, but I guess that in case of OMAP4, we are probably incrementing
twice the usage counter... but that should not hurt, because we will
decrement twice as well.
Rajendra,
Does that seems OK to you?
Thanks,
Benoit
next prev parent reply other threads:[~2011-06-28 21:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 16:11 [PATCH v3 0/8] Fix module-mode enable sequence on OMAP4 Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 1/8] OMAP2+: clockdomain: Add an api to read idle mode Benoit Cousson
2011-07-01 12:22 ` Paul Walmsley
2011-06-27 16:11 ` [PATCH v3 2/8] OMAP2+: clockdomain: Add SoC support for clkdm_is_idle Benoit Cousson
2011-06-27 19:18 ` Todd Poynor
2011-07-01 12:24 ` Paul Walmsley
2011-06-27 16:11 ` [PATCH v3 3/8] OMAP2+: PM: Initialise sleep_switch to a non-valid value Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 4/8] OMAP2+: PM: idle clkdms only if already in idle Benoit Cousson
2011-06-28 1:00 ` Todd Poynor
2011-06-27 16:11 ` [PATCH v3 5/8] OMAP4: PM: TEMP: Prevent l3init from idling/force sleep Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 6/8] OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework Benoit Cousson
2011-06-28 1:08 ` Todd Poynor
2011-06-27 16:11 ` [PATCH v3 7/8] OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming Benoit Cousson
2011-06-27 16:11 ` [PATCH v3 8/8] OMAP2+: hwmod: Follow the recommended PRCM module enable sequence Benoit Cousson
2011-06-28 0:11 ` Kevin Hilman
2011-06-28 13:05 ` Cousson, Benoit
2011-06-28 22:03 ` Rajendra Nayak
2011-06-28 22:23 ` Cousson, Benoit
2011-06-28 17:16 ` Kevin Hilman
2011-06-28 21:33 ` Cousson, Benoit [this message]
2011-06-28 21:55 ` Rajendra Nayak
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=4E0A48BA.7080602@ti.com \
--to=b-cousson@ti.com \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=toddpoynor@google.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