All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Basak, Partha" <p-basak2@ti.com>
Cc: "Nayak, Rajendra" <rnayak@ti.com>,
	"Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"Guruswamy, Senthilvadivu" <svadivu@ti.com>
Subject: Re: [PATCH 3/3] OMAP: hwmod: Force a softreset during _setup
Date: Thu, 19 Aug 2010 16:06:50 +0200	[thread overview]
Message-ID: <4C6D3A7A.2040409@ti.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB59301E82ACD94@dbde02.ent.ti.com>

On 8/19/2010 1:57 PM, Basak, Partha wrote:
>> -----Original Message-----
>> From: Cousson, Benoit
>> Sent: Wednesday, August 18, 2010 8:31 PM
>> To: Basak, Partha
>> Cc: Nayak, Rajendra; Shilimkar, Santosh; linux-omap@vger.kernel.org;
>> khilman@deeprootsystems.com; paul@pwsan.com
>> Subject: Re: [PATCH 3/3] OMAP: hwmod: Force a softreset during _setup
>>
>> Hi Partha,
>>
>> On 8/17/2010 2:46 PM, Basak, Partha wrote:
>>>
>>>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>>>> owner@vger.kernel.org] On Behalf Of Cousson, Benoit
>>>> Sent: Thursday, August 05, 2010 3:43 AM
>>>>
>>>> Force the softreset of every IPs during the _setup phase.
>>>> IPs that cannot support softreset or that should not
>>>> be reset must set the HWMOD_INIT_NO_RESET flag in the
>>>> hwmod struct.
>>>>
>>>> Signed-off-by: Benoit Cousson<b-cousson@ti.com>
>>>> Cc: Paul Walmsley<paul@pwsan.com>
>>>> Cc: Kevin Hilman<khilman@deeprootsystems.com>
>>>> ---
>>>>    arch/arm/mach-omap2/omap_hwmod.c |   17 ++++++++---------
>>>>    1 files changed, 8 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-
>>>> omap2/omap_hwmod.c
>>>> index 53b08e3..91ad9c6 100644
>>>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>>>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>>>> @@ -856,8 +856,8 @@ static int _reset(struct omap_hwmod *oh)
>>>>
>>>>    	/* clocks must be on for this operation */
>>>>    	if (oh->_state != _HWMOD_STATE_ENABLED) {
>>>> -		WARN(1, "omap_hwmod: %s: reset can only be entered from "
>>>> -		     "enabled state\n", oh->name);
>>>> +		pr_warning("omap_hwmod: %s: reset can only be entered from "
>>>> +			   "enabled state\n", oh->name);
>>>>    		return -EINVAL;
>>>>    	}
>>>>
>>>> @@ -874,8 +874,8 @@ static int _reset(struct omap_hwmod *oh)
>>>>    			  MAX_MODULE_RESET_WAIT, c);
>>>>
>>>>    	if (c == MAX_MODULE_RESET_WAIT)
>>>> -		WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n",
>>>> -		     oh->name, MAX_MODULE_RESET_WAIT);
>>>> +		pr_warning("omap_hwmod: %s: failed to reset in %d usec\n",
>>>> +			   oh->name, MAX_MODULE_RESET_WAIT);
>>>
>>> http://focus.ti.com/pdfs/wtbu/SWPU177B_FinalEPDF_12_04_2009.pdf
>>>
>>> This is leading to the above warning for DSS on OMAP3430/3630. Referring
>> to the reference manual (7.5.1 Display Subsystem Reset), successful reset
>> of DSS would need PRCM.CM_FCLKEN_DSS[2] EN_TV bit set to 1. For DSS, even
>> though TV clock is an optional clock, this is mandatory for successful DSS
>> reset. We could ignore this warning, or possibly WA it.
>>> One way could be:
>>>
>>> 1. In the database, have HWMOD_INIT_NO_RESET flag set so that _setup()
>> skips reset.
>>>
>>> 2. After omap device build of DSS is done, lookup the opt-clock and
>> enable it (using clock framework).
>>>
>>>
>>> 4. Then do DSS reset again calling omap_device_reset().
>>>
>>> All IPs that potentially have any special soft-reset sequence will need
>> customized handling. Should we keep the framework light and handle such
>> special cases in the drivers? In that case, the framework need not throw
>> up a warning. Please comment.
>>
>> If the softreset is not mandatory for an IP like DSS, you just have to
>> set this HWMOD_INIT_NO_RESET flag.
>> There is no need to use the softreset for every IP, the PRCM already
>> resets every IPs each time the power domain is powered on.
>> softreset is useful if you need to recover from an HW error.
>>
>
> I agree, however without doing soft-reset, we have observed DSI malfunction. Senthil can provide more details. As DSS needs TV_clk for successful reset, I doubt whether PRCM can reset DSS once we merely turn on the DSS power domain.

After a check with Jean, The DSS will propagate the reset to sub-IPs and 
only the one that are properly clocked will complete the reset. So the 
DSS reset status cannot transition until all sub-IPs have completed the 
reset. The issue should not exist on OMAP4 because the sys_clk is 
available for all DSS sub-IPs.

> So, it really depends on the IP in question. If it is necessary, we will do a omap_device_reset()in the driver. Correct?

We should avoid that. We can either allow a custom hooks to allow IPs 
with specifics reset / sysconfig management to change the default 
behavior. Or we can find a generic way to handle all these specifics cases.

I know that Paul have some ideas on that.

Regards,
Benoit


  reply	other threads:[~2010-08-19 14:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 22:12 [PATCH 0/3] OMAP: hwmod: Add hardreset and softreset management Benoit Cousson
2010-08-04 22:12 ` [PATCH 1/3] OMAP4: prcm: Add temporarily helper functions for rmw and read inside the PRM Benoit Cousson
2010-08-09 17:30   ` Kevin Hilman
2010-08-09 17:34     ` Cousson, Benoit
2010-08-10 16:16       ` Nayak, Rajendra
2010-08-04 22:12 ` [PATCH 2/3] OMAP: hwmod: Add hardreset management support Benoit Cousson
2010-08-04 22:12 ` [PATCH 3/3] OMAP: hwmod: Force a softreset during _setup Benoit Cousson
2010-08-17 12:46   ` Basak, Partha
2010-08-18 15:00     ` Cousson, Benoit
2010-08-19 11:57       ` Basak, Partha
2010-08-19 14:06         ` Cousson, Benoit [this message]
2010-08-23 13:57         ` Cousson, Benoit
2010-09-01 22:51           ` Paul Walmsley
2010-09-21  5:03 ` [PATCH 0/3] OMAP: hwmod: Add hardreset and softreset management Paul Walmsley
2010-09-21 16:04   ` Cousson, Benoit
2010-09-21 16:09     ` 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=4C6D3A7A.2040409@ti.com \
    --to=b-cousson@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=p-basak2@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=svadivu@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 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.