ARM: OMAP2+: hwmod: Fix sidle programming in _enable_sysc()/_idle_sysc()
authorRajendra Nayak <rnayak@ti.com>
Wed, 15 May 2013 14:48:37 +0000 (20:18 +0530)
committerPaul Walmsley <paul@pwsan.com>
Sun, 19 May 2013 22:34:02 +0000 (16:34 -0600)
commit35513171eed4d7245e81d926d311e74f3dca06f3
tree120657c7d04f1617052ad92ae795abdc30fe8918
parentf722406faae2d073cc1d01063d1123c35425939e
ARM: OMAP2+: hwmod: Fix sidle programming in _enable_sysc()/_idle_sysc()

_enable_sysc() and _idle_sysc() handle the midle mode programming correctly
and program HWMOD_IDLEMODE_SMART or HWMOD_IDLEMODE_SMART_WKUP respectively
for supported IPs (The ones which support hardware controlled midle modes)

However the same programming logic is missing when it comes to sidle mode
programming. Here they seem to just set HWMOD_IDLEMODE_SMART (Again for the
ones which support hardware controlled sidle modes)

This problem was hidden due to the fact that a call to _enable_wakeup()
in those same functions would overwrite the idlemodes and program them
correctly (to HWMOD_IDLEMODE_SMART_WKUP in the supported cases)

So fix the sidlemode handling correctly in these functions and handle the
_enable_wakeup() for SIDLEMODE supported IPs same as the way its handled
for MIDLEMODE supported ones.

Tested-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org> # OMAP4/Panda
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/omap_hwmod.c