From 233cbe5b94096f95ba7bca2162d63275b0b90b5b Mon Sep 17 00:00:00 2001 From: Rajendra Nayak Date: Tue, 14 Dec 2010 12:42:36 -0700 Subject: [PATCH] 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 Acked-by: Kevin Hilman Signed-off-by: Paul Walmsley Cc: Benoit Cousson Cc: Santosh Shilimkar --- arch/arm/mach-omap2/omap_hwmod.c | 7 +++---- 1 file 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) /* XXX ensure module interface clock is up */ - if (oh->_sysc_cache != v) { - oh->_sysc_cache = v; - omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs); - } + /* Module might have lost context, always update cache and register */ + oh->_sysc_cache = v; + omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs); } /** -- 2.39.5