From: Rajendra Nayak Date: Tue, 14 Dec 2010 19:42:36 +0000 (-0700) Subject: OMAP2+: hwmod: Update the sysc_cache in case module context is lost X-Git-Tag: MMI-PSA29.97-13-9~21439^2~15^2~65 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=233cbe5b94096f95ba7bca2162d63275b0b90b5b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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); } /**