aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2010-12-14 14:42:36 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 21:55:13 -0500
commit233cbe5b94096f95ba7bca2162d63275b0b90b5b (patch)
tree900661a0ec42b088735811240ac4a00516a8d5de /arch/arm/mach-omap2/omap_hwmod.c
parentb56b7bc8d9293b64e7a459527ae78078902751ff (diff)
OMAP2+: hwmod: Update the sysc_cache in case module context is lost
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). Identifying if a module has lost context requires atleast one register read, and since a register read has more latency than a write, it makes sense to do a blind write always. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 31990e92c573..a039b37b8e0c 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -210,10 +210,9 @@ static void _write_sysconfig(u32 v, struct omap_hwmod *oh)
210 210
211 /* XXX ensure module interface clock is up */ 211 /* XXX ensure module interface clock is up */
212 212
213 if (oh->_sysc_cache != v) { 213 /* Module might have lost context, always update cache and register */
214 oh->_sysc_cache = v; 214 oh->_sysc_cache = v;
215 omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs); 215 omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs);
216 }
217} 216}
218 217
219/** 218/**