ARM: OMAP: hwmod: wait for sysreset complete after enabling hwmod
authorTero Kristo <t-kristo@ti.com>
Tue, 30 Oct 2012 04:02:13 +0000 (22:02 -0600)
committerPaul Walmsley <paul@pwsan.com>
Tue, 30 Oct 2012 04:02:13 +0000 (22:02 -0600)
commit613ad0e98c3596cd2524172fae2a795c3fc57e4a
treeccb6484fe4efb3562e260a04b3d0bed93687ca2a
parent74549de1e439f59465b61b13b6b9de4eff76937f
ARM: OMAP: hwmod: wait for sysreset complete after enabling hwmod

When waking up from off-mode, some IP blocks are reset automatically by
hardware. For this reason, software must wait until the reset has
completed before attempting to access the IP block.

This patch fixes for example the bug introduced by commit
6c31b2150ff96755d24e0ab6d6fea08a7bf5c44c ("mmc: omap_hsmmc: remove access
to SYSCONFIG register"), in which the MMC IP block is reset during
off-mode entry, but the code expects the module to be already available
during the execution of context restore.

This version includes a fix from Kevin Hilman <khilman@ti.com> for
GPIO problems on the 37xx EVM - thanks Kevin.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Venkatraman S <svenkatr@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
[paul@pwsan.com: moved softreset wait code into separate function; call
 from top of _enable_sysc() rather than the bottom; include fix from Kevin
 Hilman for GPIO sluggishness]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/omap_hwmod.c