linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost
@ 2010-10-14 18:22 Rajendra Nayak
  2010-10-14 22:13 ` Kevin Hilman
  0 siblings, 1 reply; 8+ messages in thread
From: Rajendra Nayak @ 2010-10-14 18:22 UTC (permalink / raw)
  To: linux-omap
  Cc: Rajendra Nayak, Paul Walmsley, Benoit Cousson, Santosh Shilimkar,
	Kevin Hilman

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).

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);
 	}
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-21 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).