Skip to content

Commit

Permalink
OMAP2+: hwmod: Update the sysc_cache in case module context is lost
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rajendra Nayak authored and Paul Walmsley committed Dec 22, 2010
1 parent b56b7bc commit 233cbe5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 233cbe5

Please sign in to comment.