ARM: OMAP: hwmod: wait for sysreset complete after enabling hwmod
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 <f9849b02abe18c1ece6bd40346458ed53f49d31b@ti.com> for
GPIO problems on the 37xx EVM - thanks Kevin.

Signed-off-by: Tero Kristo <060a12f1fbc7e2e5d830b72f402ff04fdae8d312@ti.com>
Cc: Paul Walmsley <a027184a55211cd23e3f3094f1fdc728df5e0500@pwsan.com>
Cc: Benoit Cousson <1f57ac750b0b4fd69f24c35d4e23093b91dc3e77@ti.com>
Cc: Venkatraman S <e5433cb8ec0d347bc3697f245ffa1ec71043e3af@ti.com>
Tested-by: Kevin Hilman <f9849b02abe18c1ece6bd40346458ed53f49d31b@ti.com>
Cc: Kevin Hilman <f9849b02abe18c1ece6bd40346458ed53f49d31b@ti.com>
[a027184a55211cd23e3f3094f1fdc728df5e0500@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 <a027184a55211cd23e3f3094f1fdc728df5e0500@pwsan.com>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs