All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: "Cousson, Benoit" <b-cousson@ti.com>
Cc: "Valkeinen, Tomi" <tomi.valkeinen@ti.com>,
	"Hilman, Kevin" <khilman@ti.com>, Paul Walmsley <paul@pwsan.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCHv2 2/2] OMAP: add omap_device_reset()
Date: Fri, 27 May 2011 20:36:46 +0530	[thread overview]
Message-ID: <4DDFBE06.2050608@ti.com> (raw)
In-Reply-To: <4DDFBC7A.6090501@ti.com>

On 5/27/2011 8:30 PM, Cousson, Benoit wrote:
> On 5/27/2011 4:51 PM, Shilimkar, Santosh wrote:
>> On 5/27/2011 8:13 PM, Cousson, Benoit wrote:
>>> On 5/27/2011 2:46 PM, Valkeinen, Tomi wrote:
>>>> On Fri, 2011-05-27 at 14:38 +0200, Cousson, Benoit wrote:
>>>>> Hi Tomi,
>>>>>
>>>>> On 5/27/2011 9:38 AM, Valkeinen, Tomi wrote:
>>>>>> Add omap_device_reset() function which can be used to reset the
>>>>>> hwmods
>>>>>> associated with the given platform device.
>>>>>
>>>>> We've never exposed it because we are trying to avoid that any driver
>>>>> play with asynchronous HW reset. That can lead to undefined HW
>>>>> behavior :-(
>>>>>
>>>>> Do you have some strong need for that?
>>>>
>>>> DSS driver has been designed so that it resets the HW before it begins
>>>> programming it. That way we get the HW into known state. Otherwise we
>>>> need to be extra careful to program all possible registers to a sane
>>>> value. Not impossible, of course, but requires extra work.
>>>>
>>>> I noticed the problem with DSI driver, it didn't work anymore if I
>>>> didn't reset it.
>>>>
>>>> Why does it lead to undefined HW behaviour? Isn't it much better to
>>>> reset the HW before starting to use it to be 100% sure it's in known
>>>> and
>>>> valid state?
>>>
>>> In theory, but since your are resetting only the DSS IP, it can leads to
>>> side effect at SoC level. Especially wrt to clock management.
>>>
>>>> Especially in error situations it may be difficult (even impossible) to
>>>> recover without reset. DISPC has been known to froze in some sync lost
>>>> situations, and, if I recall right, if DSI transfer is aborted the only
>>>> way to recover is to reset the DSI block (on OMAP3).
>>>
>>> In case of recovery error it makes sense. What we did with hardreset is
>>> to re-assert the reset upon disable of the module and then the next
>>> enable will de-assert it. Softreset does not do that today.
>>>
>> I didn't notice this patch but Paul reported an issue on beagle
>> which was making L3 error handling driver hang.
>>
>> Later on after debugging we noticed, that DSS initiator
>> was throwing timeout error.
>>
>> As a temporary fix, we removed the timeout error from
>> the handler since root-cause was not known. [1]
>>
>> I am not sure but may be a proper DSS reset might fix
>> that issue as well.
>
> Yeah, but this is the issue... people will start abusing that to fix any
> kind of problems instead of finding the root cause.
>
May be you are right. But shouldn't we do a proper reset of the IP.
On this same topic, I have a patch for timer IP too. As per
TRM, soft reset is not enough to properly reset the timer IP
and expecting the additional register to be used for
reseting the timer IP.

> That should be use only to fix real HW issue that cannot be solve
> properly by SW.
>
I agree but TRM doesn't say the softreset is enough to ensure
the certain IP's are properly reseted.

Regards
Santosh



WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 2/2] OMAP: add omap_device_reset()
Date: Fri, 27 May 2011 20:36:46 +0530	[thread overview]
Message-ID: <4DDFBE06.2050608@ti.com> (raw)
In-Reply-To: <4DDFBC7A.6090501@ti.com>

On 5/27/2011 8:30 PM, Cousson, Benoit wrote:
> On 5/27/2011 4:51 PM, Shilimkar, Santosh wrote:
>> On 5/27/2011 8:13 PM, Cousson, Benoit wrote:
>>> On 5/27/2011 2:46 PM, Valkeinen, Tomi wrote:
>>>> On Fri, 2011-05-27 at 14:38 +0200, Cousson, Benoit wrote:
>>>>> Hi Tomi,
>>>>>
>>>>> On 5/27/2011 9:38 AM, Valkeinen, Tomi wrote:
>>>>>> Add omap_device_reset() function which can be used to reset the
>>>>>> hwmods
>>>>>> associated with the given platform device.
>>>>>
>>>>> We've never exposed it because we are trying to avoid that any driver
>>>>> play with asynchronous HW reset. That can lead to undefined HW
>>>>> behavior :-(
>>>>>
>>>>> Do you have some strong need for that?
>>>>
>>>> DSS driver has been designed so that it resets the HW before it begins
>>>> programming it. That way we get the HW into known state. Otherwise we
>>>> need to be extra careful to program all possible registers to a sane
>>>> value. Not impossible, of course, but requires extra work.
>>>>
>>>> I noticed the problem with DSI driver, it didn't work anymore if I
>>>> didn't reset it.
>>>>
>>>> Why does it lead to undefined HW behaviour? Isn't it much better to
>>>> reset the HW before starting to use it to be 100% sure it's in known
>>>> and
>>>> valid state?
>>>
>>> In theory, but since your are resetting only the DSS IP, it can leads to
>>> side effect at SoC level. Especially wrt to clock management.
>>>
>>>> Especially in error situations it may be difficult (even impossible) to
>>>> recover without reset. DISPC has been known to froze in some sync lost
>>>> situations, and, if I recall right, if DSI transfer is aborted the only
>>>> way to recover is to reset the DSI block (on OMAP3).
>>>
>>> In case of recovery error it makes sense. What we did with hardreset is
>>> to re-assert the reset upon disable of the module and then the next
>>> enable will de-assert it. Softreset does not do that today.
>>>
>> I didn't notice this patch but Paul reported an issue on beagle
>> which was making L3 error handling driver hang.
>>
>> Later on after debugging we noticed, that DSS initiator
>> was throwing timeout error.
>>
>> As a temporary fix, we removed the timeout error from
>> the handler since root-cause was not known. [1]
>>
>> I am not sure but may be a proper DSS reset might fix
>> that issue as well.
>
> Yeah, but this is the issue... people will start abusing that to fix any
> kind of problems instead of finding the root cause.
>
May be you are right. But shouldn't we do a proper reset of the IP.
On this same topic, I have a patch for timer IP too. As per
TRM, soft reset is not enough to properly reset the timer IP
and expecting the additional register to be used for
reseting the timer IP.

> That should be use only to fix real HW issue that cannot be solve
> properly by SW.
>
I agree but TRM doesn't say the softreset is enough to ensure
the certain IP's are properly reseted.

Regards
Santosh

  reply	other threads:[~2011-05-27 15:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27  7:38 [PATCHv2 0/2] Some omap_device/hwmod/pwrdomain patches Tomi Valkeinen
2011-05-27  7:38 ` Tomi Valkeinen
2011-05-27  7:38 ` [PATCHv2 1/2] OMAP: change get_context_loss_count ret value to int Tomi Valkeinen
2011-05-27  7:38   ` Tomi Valkeinen
2011-05-27  7:38 ` [PATCHv2 2/2] OMAP: add omap_device_reset() Tomi Valkeinen
2011-05-27  7:38   ` Tomi Valkeinen
2011-05-27 12:38   ` Cousson, Benoit
2011-05-27 12:38     ` Cousson, Benoit
2011-05-27 12:46     ` Tomi Valkeinen
2011-05-27 12:46       ` Tomi Valkeinen
2011-05-27 14:43       ` Cousson, Benoit
2011-05-27 14:43         ` Cousson, Benoit
2011-05-27 14:51         ` Santosh Shilimkar
2011-05-27 14:51           ` Santosh Shilimkar
2011-05-27 15:00           ` Cousson, Benoit
2011-05-27 15:00             ` Cousson, Benoit
2011-05-27 15:06             ` Santosh Shilimkar [this message]
2011-05-27 15:06               ` Santosh Shilimkar
2011-05-27 16:40         ` Tomi Valkeinen
2011-05-27 16:40           ` Tomi Valkeinen
2011-05-30  2:15           ` Paul Walmsley
2011-05-30  2:15             ` Paul Walmsley
2011-05-30  6:00             ` Tomi Valkeinen
2011-05-30  6:00               ` Tomi Valkeinen
2011-05-30  8:49             ` Cousson, Benoit
2011-05-30  8:49               ` Cousson, Benoit
2011-05-30  2:24       ` Paul Walmsley
2011-05-30  2:24         ` Paul Walmsley
2011-05-30  5:55         ` Tomi Valkeinen
2011-05-30  5:55           ` Tomi Valkeinen

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=4DDFBE06.2050608@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=tomi.valkeinen@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.