ARM: OMAP4/AM335x: hwmod: fix disable_module regression in hardreset handling
authorPaul Walmsley <paul@pwsan.com>
Tue, 9 Oct 2012 05:08:15 +0000 (23:08 -0600)
committerPaul Walmsley <paul@pwsan.com>
Tue, 9 Oct 2012 05:08:15 +0000 (23:08 -0600)
commite9332b6eed82973a8f75f1f3d57babaa331d703c
treebeb9158583964f44fcbd0879ad9394fb5dd8c55c
parentcf956d9f0734b4888655d6b7420e4dac9dba22d0
ARM: OMAP4/AM335x: hwmod: fix disable_module regression in hardreset handling

Commit eb05f691290e99ee0bd1672317d6add789523c1e ("ARM: OMAP: hwmod:
partially un-reset hwmods might not be properly enabled") added code
to skip the IP block disable sequence if all of the block's hardreset
lines weren't asserted.  But this did not handle the case when no
hardreset lines were associated with a module, which is the general
case.  In that situation, the IP block disable would be skipped.  This
is likely to cause PM regressions.

So, modify _omap4_disable_module() and _am33xx_disable_module() to
only bail out early if there are any hardreset lines asserted.  And
move the AM33xx test above the actual module disable code to ensure
that the behavior is consistent.

Reported-by: Archit Taneja <a0393947@ti.com>
Tested-by: Archit Taneja <a0393947@ti.com> # DSS
Cc: Omar Ramirez Luna <omar.luna@linaro.org>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> # AM335x
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/omap_hwmod.c