From: Kevin Hilman <khilman@deeprootsystems.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org, Paul Walmsley <paul@pwsan.com>,
Benoit Cousson <b-cousson@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: Re: [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost
Date: Thu, 14 Oct 2010 15:13:40 -0700 [thread overview]
Message-ID: <877hhkv2wb.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1287080555-25399-1-git-send-email-rnayak@ti.com> (Rajendra Nayak's message of "Thu, 14 Oct 2010 23:52:35 +0530")
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.
Kevin
> 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);
> }
next prev parent reply other threads:[~2010-10-14 22:13 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 [this message]
2010-10-15 5:48 ` Shilimkar, Santosh
2010-10-15 7:01 ` Cousson, Benoit
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=877hhkv2wb.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=b-cousson@ti.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.