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)
committerGrazvydas Ignotas <grazvydas@neurotechnology.com>
Mon, 14 Apr 2014 12:57:37 +0000 (15:57 +0300)
commita84f110d085fcc281d6797b843ede600e376aaa4
tree53255d3249771424da721455f66e333f8a8ae9e2
parenta438b5a2cec75996da7628a089b15902b9f54bb8
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>
Conflicts:

arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.c