All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>,
	"Nayak, Rajendra" <rnayak@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost
Date: Fri, 15 Oct 2010 09:01:54 +0200	[thread overview]
Message-ID: <4CB7FC62.5070806@ti.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB030D09A2FE@dbde02.ent.ti.com>

Hi Santosh,

On 10/15/2010 7:48 AM, Shilimkar, Santosh wrote:
>> From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>> Sent: Friday, October 15, 2010 3:44 AM
>>
>> Rajendra Nayak<rnayak@ti.com>  writes:
>>
>>> Do not skip the sysc programming in the hmwod framework based
>>> on the cached value alone, since at times the module might have lost
>>> context (due to the Powerdomain in which the module belongs
>>> transitions to either Open Switch RET or OFF).
>>
>> Shouldn't the driver for each IP be responsible for restoring it's
>> register contents after context loss, including it's SYSC?
>>
>> Seems to me that if SYSC is lost, it means the driver's save/restore
>> is buggy.
>>
> I am glad you asked this question. I had a same argument with Benoit
> that driver anyway does context save restore for other registers and
> it can do SYSC as well.
>
> But Benoit's point was that "sysconfig is a part of the PRCM located
> in the IP, but this is purely TI implementation specific. The same
> IP in another platform will not have this sysconfig entry. That's why
> its important to hide them from the driver "

I don't have anything to add :-)

Thanks Santosh,
Benoit

>
> This make sense too.
>
>>
>>> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
>>> Cc: Paul Walmsley<paul@pwsan.com>
>>> Cc: Benoit Cousson<b-cousson@ti.com>
>>> Cc: Santosh Shilimkar<santosh.shilimkar@ti.com>
>>> Cc: Kevin Hilman<khilman@deeprootsystems.com>
>>> ---
>>>   arch/arm/mach-omap2/omap_hwmod.c |    5 ++++-
>>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-
>> omap2/omap_hwmod.c
>>> index cb911d7..e57fe21 100644
>>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>>> @@ -115,7 +115,10 @@ static void _write_sysconfig(u32 v, struct
>> omap_hwmod *oh)
>>>
>>>   	/* XXX ensure module interface clock is up */
>>>
>>> -	if (oh->_sysc_cache != v) {
>>> +	if ((oh->_sysc_cache != v) ||
>>> +		/* Did the module go to off and loose context? */
>>> +		(oh->_sysc_cache !=
>>> +			 omap_hwmod_readl(oh, oh->class->sysc->sysc_offs))) {
>>>   		oh->_sysc_cache = v;
>>>   		omap_hwmod_writel(v, oh, oh->class->sysc->sysc_offs);
>>>   	}


  reply	other threads:[~2010-10-15  7:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 18:22 [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost Rajendra Nayak
2010-10-14 22:13 ` Kevin Hilman
2010-10-15  5:48   ` Shilimkar, Santosh
2010-10-15  7:01     ` Cousson, Benoit [this message]
2010-10-15 15:40     ` Kevin Hilman
2010-10-21 10:13       ` Nayak, Rajendra
2010-10-21 15:00         ` Cousson, Benoit
2010-10-21 17:31         ` Kevin Hilman

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=4CB7FC62.5070806@ti.com \
    --to=b-cousson@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@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.